提交 e3ac5868 编写于 作者: J Joao Moreno

fixes #5259

上级 8ca1f811
......@@ -212,17 +212,18 @@ function setupIPC(): TPromise<Server> {
app.dock.hide();
}
// Tests from CLI require to be the only instance currently (TODO@Ben support multiple instances and output)
if (env.isTestingFromCli) {
const errorMsg = 'Running extension tests from the command line is currently only supported if no other instance of Code is running.';
console.error(errorMsg);
return TPromise.wrapError(errorMsg);
}
// there's a running instance, let's connect to it
return connect(env.mainIPCHandle).then(
client => {
// Tests from CLI require to be the only instance currently (TODO@Ben support multiple instances and output)
if (env.isTestingFromCli) {
const msg = 'Running extension tests from the command line is currently only supported if no other instance of Code is running.';
console.error(msg);
client.dispose();
return TPromise.wrapError(msg);
}
env.log('Sending env to running instance...');
const service = client.getService<LaunchService>('LaunchService', LaunchService);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册