mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Remove trailing slash (fixes #97885)
This commit is contained in:
@@ -601,9 +601,12 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
}
|
||||
// Do not set to empty configuration at startup if setting is empty to not override configuration through CLI options:
|
||||
const env = process.env;
|
||||
const newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
|
||||
let newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
|
||||
|| (env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || '').trim() // Not standardized.
|
||||
|| undefined;
|
||||
if (newHttpProxy?.endsWith('/')) {
|
||||
newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1);
|
||||
}
|
||||
const newNoProxy = (env.no_proxy || env.NO_PROXY || '').trim() || undefined; // Not standardized.
|
||||
if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) {
|
||||
this.currentHttpProxy = newHttpProxy;
|
||||
|
||||
Reference in New Issue
Block a user