Skip to content

Commit 345bd3f

Browse files
committed
fix: remove trailing slashes from a URL before append
1 parent ae1e425 commit 345bd3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/commands.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export class Commands {
2626
// https://github.com/coder/vscode-coder/issues/44
2727
url = "https://" + url
2828
}
29-
29+
while (url.endsWith("/")) {
30+
url = url.substring(0, url.length - 1)
31+
}
3032
let token: string | undefined = args.length >= 2 ? args[1] : undefined
3133
if (!token) {
3234
const opened = await vscode.env.openExternal(vscode.Uri.parse(`${url}/cli-auth`))

0 commit comments

Comments
 (0)