Skip to content

Commit 608f605

Browse files
committed
fix: terminal link when host ends in /
1 parent 64b7d93 commit 608f605

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
## Unreleased
66

7+
### Fixed
8+
- terminal link is now correct when host ends in `/`
9+
710
## 2.1.6 - 2023-02-01
811

912
### Fixed

src/main/kotlin/com/coder/gateway/views/steps/CoderLocateRemoteProjectStepView.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.coder.gateway.models.WorkspaceAgentModel
77
import com.coder.gateway.sdk.Arch
88
import com.coder.gateway.sdk.CoderRestClientService
99
import com.coder.gateway.sdk.OS
10+
import com.coder.gateway.sdk.withPath
1011
import com.coder.gateway.toWorkspaceParams
1112
import com.coder.gateway.views.LazyBrowserLink
1213
import com.coder.gateway.withProjectPath
@@ -134,7 +135,7 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
134135

135136
tfProject.text = if (selectedWorkspace.homeDirectory.isNullOrBlank()) "/home" else selectedWorkspace.homeDirectory
136137
titleLabel.text = CoderGatewayBundle.message("gateway.connector.view.coder.remoteproject.choose.text", selectedWorkspace.name)
137-
terminalLink.url = "${coderClient.coderURL}/@${coderClient.me.username}/${selectedWorkspace.name}/terminal"
138+
terminalLink.url = coderClient.coderURL.withPath("/@${coderClient.me.username}/${selectedWorkspace.name}/terminal").toString()
138139

139140
ideResolvingJob = cs.launch {
140141
try {

0 commit comments

Comments
 (0)