Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use-inmemory-secretstorage to be defined in argv.json and include it & password-store in the JSONSchema #194954

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 14 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,15 @@ function configureCommandlineSwitchesSync(cliArgs) {
'disable-hardware-acceleration',

// override for the color profile to use
'force-color-profile',

// override which password-store is used
'password-store'
'force-color-profile'
];

if (process.platform === 'linux') {

// Force enable screen readers on Linux via this flag
SUPPORTED_ELECTRON_SWITCHES.push('force-renderer-accessibility');

// override which password-store is used on Linux
SUPPORTED_ELECTRON_SWITCHES.push('password-store');
}

const SUPPORTED_MAIN_PROCESS_SWITCHES = [
Expand All @@ -219,7 +218,10 @@ function configureCommandlineSwitchesSync(cliArgs) {
'enable-proposed-api',

// Log level to use. Default is 'info'. Allowed values are 'error', 'warn', 'info', 'debug', 'trace', 'off'.
'log-level'
'log-level',

// Use an in-memory storage for secrets
'use-inmemory-secretstorage'
];

// Read argv config
Expand Down Expand Up @@ -272,6 +274,12 @@ function configureCommandlineSwitchesSync(cliArgs) {
}
}
break;

case 'use-inmemory-secretstorage':
if (argvValue) {
process.argv.push('--use-inmemory-secretstorage');
}
break;
}
}
});
Expand Down
8 changes: 8 additions & 0 deletions src/vs/workbench/electron-sandbox/desktop.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ import { applicationConfigurationNodeBase, securityConfigurationNodeBase } from
'disable-chromium-sandbox': {
type: 'boolean',
description: localize('argv.disableChromiumSandbox', "Disables the Chromium sandbox. This is useful when running VS Code as elevated on Linux and running under Applocker on Windows.")
},
'use-inmemory-secretstorage': {
type: 'boolean',
description: localize('argv.useInMemorySecretStorage', "Ensures that an in-memory store will be used for secret storage instead of using the OS's credential store. This is often used when running VS Code extension tests or when you're experiencing difficulties with the credential store.")
}
}
};
Expand All @@ -369,6 +373,10 @@ import { applicationConfigurationNodeBase, securityConfigurationNodeBase } from
type: 'boolean',
description: localize('argv.force-renderer-accessibility', 'Forces the renderer to be accessible. ONLY change this if you are using a screen reader on Linux. On other platforms the renderer will automatically be accessible. This flag is automatically set if you have editor.accessibilitySupport: on.'),
};
schema.properties!['password-store'] = {
type: 'string',
description: localize('argv.passwordStore', "Configures the backend used to store secrets on Linux. This argument is ignored on Windows & macOS.")
};
}

jsonRegistry.registerSchema(argvDefinitionFileSchemaId, schema);
Expand Down