Skip to content

Commit be5a16b

Browse files
committed
Remove trailing slash (fixes microsoft#97885)
1 parent 8eef842 commit be5a16b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/vs/code/electron-main/window.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,12 @@ export class CodeWindow extends Disposable implements ICodeWindow {
601601
}
602602
// Do not set to empty configuration at startup if setting is empty to not override configuration through CLI options:
603603
const env = process.env;
604-
const newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
604+
let newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
605605
|| (env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || '').trim() // Not standardized.
606606
|| undefined;
607+
if (newHttpProxy?.endsWith('/')) {
608+
newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1);
609+
}
607610
const newNoProxy = (env.no_proxy || env.NO_PROXY || '').trim() || undefined; // Not standardized.
608611
if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) {
609612
this.currentHttpProxy = newHttpProxy;

0 commit comments

Comments
 (0)