mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 10:40:41 +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');
|
throw new Error('wslpath does not exist on Windows build < 17063');
|
||||||
}
|
}
|
||||||
return new Promise<string>(c => {
|
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()));
|
c(escapeNonWindowsPath(stdout.trim()));
|
||||||
});
|
});
|
||||||
|
proc.stdin.end();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue