Skip to content

Commit d712aeb

Browse files
author
Benjamin Pasero
committed
opn/open should work with app URI scheme too
1 parent 21da9e0 commit d712aeb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/vs/workbench/api/common/extHostRequireInterceptor.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export abstract class RequireInterceptor {
5757
this.register(new VSCodeNodeModuleFactory(this._apiFactory, extensionPaths, this._extensionRegistry, configProvider));
5858
this.register(this._instaService.createInstance(KeytarNodeModuleFactory));
5959
if (this._initData.remote.isRemote) {
60-
this.register(this._instaService.createInstance(OpenNodeModuleFactory, extensionPaths));
60+
this.register(this._instaService.createInstance(OpenNodeModuleFactory, extensionPaths, this._initData.environment.appUriScheme));
6161
}
6262
}
6363

@@ -228,6 +228,7 @@ class OpenNodeModuleFactory implements INodeModuleFactory {
228228

229229
constructor(
230230
private readonly _extensionPaths: TernarySearchTree<IExtensionDescription>,
231+
private readonly _appUriScheme: string,
231232
@IExtHostRpcService rpcService: IExtHostRpcService,
232233
) {
233234

@@ -242,7 +243,7 @@ class OpenNodeModuleFactory implements INodeModuleFactory {
242243
}
243244
if (uri.scheme === 'http' || uri.scheme === 'https') {
244245
return mainThreadWindow.$openUri(uri, { allowTunneling: true });
245-
} else if (uri.scheme === 'mailto') {
246+
} else if (uri.scheme === 'mailto' || uri.scheme === this._appUriScheme) {
246247
return mainThreadWindow.$openUri(uri, {});
247248
}
248249
return this.callOriginal(target, options);

0 commit comments

Comments
 (0)