Skip to content

Commit 024298d

Browse files
committed
Fix workspace url for "debug" workspaces
1 parent bb7dc69 commit 024298d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/local-ssh/ipc/extensionServiceServer.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ class ExtensionServiceImpl implements ExtensionServiceImplementation {
117117
const url = new URL(wsData.workspaceUrl);
118118
const workspaceHost = url.host.substring(url.host.indexOf('.') + 1);
119119

120-
const sshkey = wsData.phase === 'running' ? (await this.getWorkspaceSSHKey(ownerToken, wsData.workspaceUrl, _context.signal)) : '';
120+
let actualWorkspaceUrl = wsData.workspaceUrl;
121+
if (workspaceId !== actualWorkspaceId) {
122+
// Public api doesn't take into account "debug" workspaces, readd 'debug-' prefix
123+
actualWorkspaceUrl = actualWorkspaceUrl.replace(actualWorkspaceId, workspaceId);
124+
}
125+
126+
const sshkey = wsData.phase === 'running' ? (await this.getWorkspaceSSHKey(ownerToken, actualWorkspaceUrl, _context.signal)) : '';
121127

122128
return {
123129
gitpodHost,

0 commit comments

Comments
 (0)