提交 6432f0bf 编写于 作者: L Logan Ramos

Fixed exit code issues with promises

上级 f75b94c9
......@@ -73,7 +73,7 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable {
return Promise.reject(SHELL_CWD_INVALID_EXIT_CODE);
}
return;
}).catch((err) => {
}, err => {
if (err && err.code === 'ENOENT') {
// So we can include in the error message the specified CWD
shellLaunchConfig.cwd = cwd;
......@@ -87,7 +87,7 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable {
return Promise.reject(stat.isDirectory() ? SHELL_PATH_DIRECTORY_EXIT_CODE : SHELL_PATH_INVALID_EXIT_CODE);
}
return;
}).catch(async (err) => {
}, async (err) => {
if (err && err.code === 'ENOENT') {
let cwd = shellLaunchConfig.cwd instanceof URI ? shellLaunchConfig.cwd.path : shellLaunchConfig.cwd!;
const executable = await findExecutable(shellLaunchConfig.executable!, cwd);
......@@ -95,7 +95,6 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable {
return Promise.reject(SHELL_PATH_INVALID_EXIT_CODE);
}
}
return;
});
Promise.all([cwdVerification, exectuableVerification]).then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册