Skip to content

Commit

Permalink
fixes #5259
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Apr 14, 2016
1 parent 8ca1f81 commit e3ac586
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/vs/workbench/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e3ac586

Please sign in to comment.