提交 34d02c22 编写于 作者: E Eric Amodio

Works around WSL2(?) issue

Bash/wsl fails to return until stdin pipe is ended in recent Win vers
上级 e599448b
...@@ -69,9 +69,10 @@ export class TerminalNativeService implements ITerminalNativeService { ...@@ -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();
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册