console.warn(`Could not identify extension for 'vscode' require call from ${parent.filename}. These are the extension path mappings: \n${extensionPathsPretty}`);
this._gracefulExit(failures&&failures>0?1/* ERROR */:0/* OK */);
});
});
}
// Otherwise make sure to shutdown anyway even in case of an error
else{
this._gracefulExit(1/* ERROR */);
}
returnPromise.reject(newError(requireError?requireError.toString():nls.localize('extensionTestError',"Path {0} does not point to a valid extension test runner.",this._initData.environment.extensionTestsPath)));
}
private_gracefulExit(code:number):void{
// to give the PH process a chance to flush any outstanding console
// messages to the main process, we delay the exit() by some time
setTimeout(()=>this._nativeExit(code),500);
}
private_startExtensionHost():Thenable<void>{
if(this._started){
thrownewError(`Extension host is already started!`);
constallowExit=!!this._environment.extensionTestsPath;// to support other test frameworks like Jasmin that use process.exit (https://github.com/Microsoft/vscode/issues/37708)
patchProcess(allowExit);
...
...
@@ -90,8 +78,7 @@ export class ExtensionHostMain {
this.gracefulExit(failures&&failures>0?1/* ERROR */:0/* OK */);
});
});
}
// Otherwise make sure to shutdown anyway even in case of an error
else{
this.gracefulExit(1/* ERROR */);
}
returnPromise.reject(newError(requireError?requireError.toString():nls.localize('extensionTestError',"Path {0} does not point to a valid extension test runner.",this._environment.extensionTestsPath)));