mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 12:10:22 -05:00
Fixed exit code issues with promises
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user