Rename --disable-keytar to --use-inmemory-secretstorage (#192312)

This renames the flag as the title suggests but keeps `--disable-keytar` in the `deprecates` section so it still works.

Fixes https://github.com/microsoft/vscode/issues/191498
This commit is contained in:
Tyler James Leonhardt 2023-09-08 08:58:32 -07:00 committed by GitHub
parent 93b79352e4
commit a4a2d8f0f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 13 deletions

View File

@ -35,7 +35,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
:: Tests in the extension host
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
echo.
echo ### API tests (folder)

View File

@ -44,7 +44,7 @@ echo
# Tests in the extension host
API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
if [ -z "$INTEGRATION_TEST_APP_NAME" ]; then
kill_app() { true; }

View File

@ -55,7 +55,7 @@ echo Storing log files into '%VSCODELOGSDIR%'
:: Tests in the extension host
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --disable-keytar --disable-inspect --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-inspect --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
echo.
echo ### API tests (folder)

View File

@ -68,7 +68,7 @@ else
kill_app() { killall $INTEGRATION_TEST_APP_NAME || true; }
fi
API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --disable-keytar --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
echo "Storing crash reports into '$VSCODECRASHDIR'."
echo "Storing log files into '$VSCODELOGSDIR'."

View File

@ -91,7 +91,7 @@ export interface NativeParsedArgs {
'export-default-configuration'?: string;
'install-source'?: string;
'disable-updates'?: boolean;
'disable-keytar'?: boolean;
'use-inmemory-secretstorage'?: boolean;
'password-store'?: string;
'disable-workspace-trust'?: boolean;
'disable-crash-reporter'?: boolean;

View File

@ -141,8 +141,8 @@ export interface INativeEnvironmentService extends IEnvironmentService {
extensionsDownloadLocation: URI;
builtinExtensionsPath: string;
// --- use keytar for credentials
disableKeytar?: boolean;
// --- use in-memory Secret Storage
useInMemorySecretStorage?: boolean;
crossOriginIsolated?: boolean;

View File

@ -237,7 +237,7 @@ export abstract class AbstractNativeEnvironmentService implements INativeEnviron
get disableWorkspaceTrust(): boolean { return !!this.args['disable-workspace-trust']; }
@memoize
get disableKeytar(): boolean { return !!this.args['disable-keytar']; }
get useInMemorySecretStorage(): boolean { return !!this.args['use-inmemory-secretstorage']; }
@memoize
get policyFile(): URI | undefined {

View File

@ -149,7 +149,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'skip-welcome': { type: 'boolean' },
'disable-telemetry': { type: 'boolean' },
'disable-updates': { type: 'boolean' },
'disable-keytar': { type: 'boolean' },
'use-inmemory-secretstorage': { type: 'boolean', deprecates: ['disable-keytar'] },
'password-store': { type: 'string' },
'disable-workspace-trust': { type: 'boolean' },
'disable-crash-reporter': { type: 'boolean' },

View File

@ -31,8 +31,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
@ILogService logService: ILogService
) {
super(
// TODO: rename disableKeytar to disableSecretStorage or similar
!!_environmentService.disableKeytar,
!!_environmentService.useInMemorySecretStorage,
storageService,
encryptionService,
logService
@ -43,7 +42,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
this._sequencer.queue(key, async () => {
await this.resolvedStorageService;
if (this.type !== 'persisted' && !this._environmentService.disableKeytar) {
if (this.type !== 'persisted' && !this._environmentService.useInMemorySecretStorage) {
this._logService.trace('[NativeSecretStorageService] Notifying user that secrets are not being stored on disk.');
await this.notifyOfNoEncryptionOnce();
}

View File

@ -29,7 +29,7 @@ export async function resolveElectronConfiguration(options: LaunchOptions): Prom
'--disable-telemetry',
'--no-cached-data',
'--disable-updates',
'--disable-keytar',
'--use-inmemory-secretstorage',
`--crash-reporter-directory=${crashesPath}`,
'--disable-workspace-trust',
`--extensions-dir=${extensionsPath}`,