mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Fixed exit code issues with promises
This commit is contained in:
parent
f75b94c9be
commit
6432f0bfb7
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in a new issue