assign execPath also in other places where we use environment service

This commit is contained in:
Benjamin Pasero
2016-08-17 14:06:38 +02:00
parent e1f12e5c1b
commit 16c67219d7
3 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import * as path from 'path';
import { parseArgs, ParsedArgs } from 'vs/code/node/argv';
import { TPromise } from 'vs/base/common/winjs.base';
import { sequence } from 'vs/base/common/async';
import * as objects from 'vs/base/common/objects';
import { IPager } from 'vs/base/common/paging';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
@@ -145,7 +146,7 @@ const eventPrefix = 'monacoworkbench';
export function main(argv: ParsedArgs): TPromise<void> {
const services = new ServiceCollection();
services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, parseArgs(process.argv)));
services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, objects.assign(parseArgs(process.argv), { execPath: process.execPath })));
const instantiationService: IInstantiationService = new InstantiationService(services);