mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-22 19:29:17 +00:00
Allow disabling integrated askpass (#115455)
The GIT_ASKPASS variable is currently enforced by vscode and there is no way to overwrite it. This commit adds an options to disable the integrated askpass and use your own. Fixes #111839
This commit is contained in:
@@ -79,13 +79,19 @@ export class Askpass implements IIPCHandler {
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
let env: { [key: string]: string; } = {
|
||||
...this.ipc.getEnv(),
|
||||
GIT_ASKPASS: path.join(__dirname, 'askpass.sh'),
|
||||
VSCODE_GIT_ASKPASS_NODE: process.execPath,
|
||||
VSCODE_GIT_ASKPASS_EXTRA_ARGS: (process.versions['electron'] && process.versions['microsoft-build']) ? '--ms-enable-electron-run-as-node' : '',
|
||||
VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js')
|
||||
};
|
||||
|
||||
const config = workspace.getConfiguration('git');
|
||||
if (config.get<boolean>('useIntegratedAskPass')) {
|
||||
env.GIT_ASKPASS = path.join(__dirname, 'askpass.sh');
|
||||
}
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
registerCredentialsProvider(provider: CredentialsProvider): Disposable {
|
||||
|
||||
Reference in New Issue
Block a user