Skip to content

Commit 1a2b9b5

Browse files
authored
Merge pull request microsoft#209103 from microsoft/tyriar/208572
Adjust scheme and authority of URIs in remote terminals
2 parents 84d8f1b + c204429 commit 1a2b9b5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkResolver.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ export class TerminalLinkResolver implements ITerminalLinkResolver {
2525
}
2626

2727
async resolveLink(processManager: Pick<ITerminalProcessManager, 'initialCwd' | 'os' | 'remoteAuthority' | 'userHome'> & { backend?: Pick<ITerminalBackend, 'getWslPath'> }, link: string, uri?: URI): Promise<ResolvedLink> {
28+
// Correct scheme and authority for remote terminals
29+
if (uri && uri.scheme === Schemas.file && processManager.remoteAuthority) {
30+
uri = uri.with({
31+
scheme: Schemas.vscodeRemote,
32+
authority: processManager.remoteAuthority
33+
});
34+
}
35+
2836
// Get the link cache
2937
let cache = this._resolvedLinkCaches.get(processManager.remoteAuthority ?? '');
3038
if (!cache) {

0 commit comments

Comments
 (0)