This commit is contained in:
Joao Moreno 2016-04-14 18:54:21 +02:00
parent 8ca1f811df
commit e3ac586869

View file

@ -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);