Fix suppressImplicitAnyIndexErrors false in externalTerminal

Part of #76442
This commit is contained in:
Daniel Imms 2019-07-03 10:14:29 -07:00
parent 0991720b7b
commit f7c692ab4c

View file

@ -326,7 +326,7 @@ export class LinuxExternalTerminalService implements IExternalTerminalService {
* tries to turn OS errors into more meaningful error messages
*/
function improveError(err: Error): Error {
if (err['errno'] === 'ENOENT' && err['path']) {
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']));
}
return err;