From d712aeb26b67b180c6db42939472e465b8efb0bb Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 22 Oct 2019 11:57:36 +0200 Subject: [PATCH] opn/open should work with app URI scheme too --- src/vs/workbench/api/common/extHostRequireInterceptor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/common/extHostRequireInterceptor.ts b/src/vs/workbench/api/common/extHostRequireInterceptor.ts index 9e4cdb09361..158239df616 100644 --- a/src/vs/workbench/api/common/extHostRequireInterceptor.ts +++ b/src/vs/workbench/api/common/extHostRequireInterceptor.ts @@ -57,7 +57,7 @@ export abstract class RequireInterceptor { this.register(new VSCodeNodeModuleFactory(this._apiFactory, extensionPaths, this._extensionRegistry, configProvider)); this.register(this._instaService.createInstance(KeytarNodeModuleFactory)); if (this._initData.remote.isRemote) { - this.register(this._instaService.createInstance(OpenNodeModuleFactory, extensionPaths)); + this.register(this._instaService.createInstance(OpenNodeModuleFactory, extensionPaths, this._initData.environment.appUriScheme)); } } @@ -228,6 +228,7 @@ class OpenNodeModuleFactory implements INodeModuleFactory { constructor( private readonly _extensionPaths: TernarySearchTree, + private readonly _appUriScheme: string, @IExtHostRpcService rpcService: IExtHostRpcService, ) { @@ -242,7 +243,7 @@ class OpenNodeModuleFactory implements INodeModuleFactory { } if (uri.scheme === 'http' || uri.scheme === 'https') { return mainThreadWindow.$openUri(uri, { allowTunneling: true }); - } else if (uri.scheme === 'mailto') { + } else if (uri.scheme === 'mailto' || uri.scheme === this._appUriScheme) { return mainThreadWindow.$openUri(uri, {}); } return this.callOriginal(target, options);