Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar authored and isidorn committed Jan 10, 2018
1 parent 0fd4eda commit b5efda7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/vs/code/electron-main/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ export class LaunchService implements ILaunchService {
}

private startOpenUrl(args: ParsedArgs): TPromise<void> {
const openUrlArg = args['open-url'] || [];
if (openUrlArg && args._urls && args._urls.length) {
if (args['open-url'] && args._urls && args._urls.length > 0) {
// --open-url must contain -- followed by the url(s)
// process.argv is used over args._ as args._ are resolved to file paths at this point
args._urls.forEach(url => this.urlService.open(url));
Expand Down
2 changes: 1 addition & 1 deletion src/vs/code/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function createServices(args: ParsedArgs, bufferLogService: BufferLogService): I
services.set(IStateService, new SyncDescriptor(StateService));
services.set(IConfigurationService, new SyncDescriptor(ConfigurationService));
services.set(IRequestService, new SyncDescriptor(RequestService));
services.set(IURLService, new SyncDescriptor(URLService, args['open-url']));
services.set(IURLService, new SyncDescriptor(URLService, args['open-url'] ? args._urls : ''));
services.set(IBackupMainService, new SyncDescriptor(BackupMainService));

return new InstantiationService(services, true);
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/environment/node/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const options: minimist.Opts = {
'debugBrkPluginHost',
'debugSearch',
'debugBrkSearch',
'open-url',
'enable-proposed-api',
'export-default-configuration',
'install-source'
Expand All @@ -41,6 +40,7 @@ const options: minimist.Opts = {
'new-window',
'unity-launch',
'reuse-window',
'open-url',
'performance',
'prof-startup',
'verbose',
Expand Down

0 comments on commit b5efda7

Please sign in to comment.