Skip to content

Commit 5c555dd

Browse files
committed
Update proxyUrl path mgmt
1 parent e0c4d8d commit 5c555dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/command/render/render-shared.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,14 @@ export async function printBrowsePreviewMessage(
178178
info(`\nPreview server: ${previewURL(host, port, path = "")}`);
179179
info(`\nBrowse at ${url}`, { format: colors.green });
180180
} else if (isVSCodeTerminal() && isVSCodeServer()) {
181-
if (vsCodeServerProxyUri().endsWith("/")) {
181+
const proxyUrl = vsCodeServerProxyUri()!;
182+
if (proxyUrl.endsWith("/")) {
182183
path = path.startsWith("/") ? path.slice(1) : path;
183184
} else {
184185
path = path.startsWith("/") ? path : "/" + path;
185186
}
186-
const browseUrl = vsCodeServerProxyUri()!.replace("{{port}}", `${port}`) +
187-
sep + path;
187+
const browseUrl = proxyUrl.replace("{{port}}", `${port}`) +
188+
path;
188189
info(`\nBrowse at ${browseUrl}`, { format: colors.green });
189190
} else if (isJupyterHubServer()) {
190191
const httpReferrer = `${

0 commit comments

Comments
 (0)