mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-08 15:55:15 +01:00
Fix --disable-keytar handling in the renderer process (#189578)
* Don't notify if we have opted to disableKeytar * actually hook up disableKeytar * remove main override
This commit is contained in:
committed by
GitHub
parent
9e2de48fa9
commit
2e20b451a5
@@ -236,6 +236,9 @@ export abstract class AbstractNativeEnvironmentService implements INativeEnviron
|
||||
@memoize
|
||||
get disableWorkspaceTrust(): boolean { return !!this.args['disable-workspace-trust']; }
|
||||
|
||||
@memoize
|
||||
get disableKeytar(): boolean { return !!this.args['disable-keytar']; }
|
||||
|
||||
@memoize
|
||||
get policyFile(): URI | undefined {
|
||||
if (this.args['__enable-file-policy']) {
|
||||
|
||||
@@ -59,9 +59,6 @@ export class EnvironmentMainService extends NativeEnvironmentService implements
|
||||
@memoize
|
||||
get disableUpdates(): boolean { return !!this.args['disable-updates']; }
|
||||
|
||||
@memoize
|
||||
get disableKeytar(): boolean { return !!this.args['disable-keytar']; }
|
||||
|
||||
@memoize
|
||||
get crossOriginIsolated(): boolean { return !!this.args['enable-coi']; }
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ export class BaseSecretStorageService implements ISecretStorageService {
|
||||
private async initialize(): Promise<IStorageService> {
|
||||
let storageService;
|
||||
if (!this._useInMemoryStorage && await this._encryptionService.isEncryptionAvailable()) {
|
||||
this._logService.trace(`[SecretStorageService] Encryption is available, using persisted storage`);
|
||||
this._type = 'persisted';
|
||||
storageService = this._storageService;
|
||||
} else {
|
||||
|
||||
@@ -43,7 +43,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
|
||||
this._sequencer.queue(key, async () => {
|
||||
await this.resolvedStorageService;
|
||||
|
||||
if (this.type !== 'persisted') {
|
||||
if (this.type !== 'persisted' && !this._environmentService.disableKeytar) {
|
||||
this._logService.trace('[NativeSecretStorageService] Notifying user that secrets are not being stored on disk.');
|
||||
await this.notifyOfNoEncryptionOnce();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user