Skip to content

Commit b45077d

Browse files
committed
fix(editor): strip leading slash for bin path on windows (#13738)
The `bin` variable is under windows `\C:\Users\..`, using this path style to check accessibility, will check a file like: `C:\C:\Users\...` which is of course invalid.
1 parent 8fa6227 commit b45077d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

editors/vscode/client/ConfigService.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ export class ConfigService implements IDisposable {
7373
return;
7474
}
7575
bin = path.normalize(path.join(cwd, bin));
76+
// strip the leading slash on Windows
77+
if (process.platform === 'win32' && bin.startsWith('\\')) {
78+
bin = bin.slice(1);
79+
}
7680
}
7781

7882
return bin;

0 commit comments

Comments
 (0)