mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Merge pull request #276116 from microsoft/tyriar/276071_externalterm
Remove in operator from externalTerminal
This commit is contained in:
@@ -239,7 +239,6 @@ export default tseslint.config(
|
||||
'src/vs/platform/contextkey/browser/contextKeyService.ts',
|
||||
'src/vs/platform/contextkey/test/common/scanner.test.ts',
|
||||
'src/vs/platform/dataChannel/browser/forwardingTelemetryService.ts',
|
||||
'src/vs/platform/externalTerminal/node/externalTerminalService.ts',
|
||||
'src/vs/platform/hover/browser/hoverService.ts',
|
||||
'src/vs/platform/hover/browser/hoverWidget.ts',
|
||||
'src/vs/platform/instantiation/common/instantiationService.ts',
|
||||
|
||||
@@ -75,7 +75,7 @@ export class WindowsExternalTerminalService extends ExternalTerminalService impl
|
||||
}
|
||||
|
||||
public async runInTerminal(title: string, dir: string, args: string[], envVars: ITerminalEnvironment, settings: IExternalTerminalSettings): Promise<number | undefined> {
|
||||
const exec = 'windowsExec' in settings && settings.windowsExec ? settings.windowsExec : WindowsExternalTerminalService.getDefaultTerminalWindows();
|
||||
const exec = settings.windowsExec ?? WindowsExternalTerminalService.getDefaultTerminalWindows();
|
||||
const wt = await WindowsExternalTerminalService.getWtExePath();
|
||||
|
||||
return new Promise<number | undefined>((resolve, reject) => {
|
||||
@@ -348,8 +348,8 @@ function getSanitizedEnvironment(process: NodeJS.Process) {
|
||||
* tries to turn OS errors into more meaningful error messages
|
||||
*/
|
||||
function improveError(err: Error & { errno?: string; path?: string }): Error {
|
||||
if ('errno' in err && err['errno'] === 'ENOENT' && 'path' in err && typeof err['path'] === 'string') {
|
||||
return new Error(nls.localize('ext.term.app.not.found', "can't find terminal application '{0}'", err['path']));
|
||||
if (err.errno === 'ENOENT' && err.path) {
|
||||
return new Error(nls.localize('ext.term.app.not.found', "can't find terminal application '{0}'", err.path));
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user