Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e012a4

Browse files
committed
Handle "--" as delimeter between workspace name and agent
1 parent f9ac761 commit 1e012a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/ssh.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ func (r *RootCmd) ssh() *serpent.Command {
183183

184184
namedWorkspace := strings.TrimPrefix(inv.Args[0], hostPrefix)
185185
// Support "--" as a delimiter between owner and workspace name
186-
namedWorkspace = strings.ReplaceAll(namedWorkspace, "--", "/")
186+
namedWorkspace = strings.Replace(namedWorkspace, "--", "/", 1)
187+
// Support "--" as a delimiter between workspace name and agent
188+
namedWorkspace = strings.Replace(namedWorkspace, "--", ".", 1)
187189

188190
workspace, workspaceAgent, err := getWorkspaceAndAgent(ctx, inv, client, !disableAutostart, namedWorkspace)
189191
if err != nil {

0 commit comments

Comments
 (0)