From 35d47fef6b9b0913cfa382ff36a9b508c7c246ec Mon Sep 17 00:00:00 2001 From: Huiwen Date: Tue, 17 Oct 2023 06:43:25 -0500 Subject: [PATCH] Fix incorrect start workspace url (#18934) --- components/gitpod-protocol/src/util/gitpod-host-url.ts | 2 +- components/supervisor/frontend/src/shared/urls.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/gitpod-protocol/src/util/gitpod-host-url.ts b/components/gitpod-protocol/src/util/gitpod-host-url.ts index d2d9a496f662af..84b0bed03e217a 100644 --- a/components/gitpod-protocol/src/util/gitpod-host-url.ts +++ b/components/gitpod-protocol/src/util/gitpod-host-url.ts @@ -120,7 +120,7 @@ export class GitpodHostUrl { } asStart(workspaceId = this.workspaceId): GitpodHostUrl { - return this.withoutWorkspacePrefix().with({ + return this.with({ pathname: "/start/", hash: "#" + workspaceId, }); diff --git a/components/supervisor/frontend/src/shared/urls.ts b/components/supervisor/frontend/src/shared/urls.ts index 07d9ff8f10043c..6096e4c51dfa8e 100644 --- a/components/supervisor/frontend/src/shared/urls.ts +++ b/components/supervisor/frontend/src/shared/urls.ts @@ -10,4 +10,4 @@ export const workspaceUrl = new GitpodHostUrl(window.location.href); export const serverUrl = workspaceUrl.withoutWorkspacePrefix(); -export const startUrl = workspaceUrl.asStart(); +export const startUrl = serverUrl.asStart(workspaceUrl.workspaceId);