mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
opn/open should work with app URI scheme too
This commit is contained in:
@@ -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<IExtensionDescription>,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user