mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Works around WSL2(?) issue
Bash/wsl fails to return until stdin pipe is ended in recent Win vers
This commit is contained in:
parent
e599448b07
commit
34d02c22fa
|
@ -69,9 +69,10 @@ export class TerminalNativeService implements ITerminalNativeService {
|
|||
throw new Error('wslpath does not exist on Windows build < 17063');
|
||||
}
|
||||
return new Promise<string>(c => {
|
||||
execFile('bash.exe', ['-c', 'echo $(wslpath ' + escapeNonWindowsPath(path) + ')'], {}, (error, stdout, stderr) => {
|
||||
const proc = execFile('bash.exe', ['-c', `wslpath ${escapeNonWindowsPath(path)}`], {}, (error, stdout, stderr) => {
|
||||
c(escapeNonWindowsPath(stdout.trim()));
|
||||
});
|
||||
proc.stdin.end();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue