mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: build application URL (#9601)
* refactor: build application URL * fix
This commit is contained in:
+3
-3
@@ -40,9 +40,9 @@ func (r *RootCmd) vscodeSSH() *clibase.Cmd {
|
||||
cmd := &clibase.Cmd{
|
||||
// A SSH config entry is added by the VS Code extension that
|
||||
// passes %h to ProxyCommand. The prefix of `coder-vscode--`
|
||||
// is a magical string represented in our VS Cod extension.
|
||||
// is a magical string represented in our VS Code extension.
|
||||
// It's not important here, only the delimiter `--` is.
|
||||
Use: "vscodessh <coder-vscode--<owner>-<workspace>-<agent?>>",
|
||||
Use: "vscodessh <coder-vscode--<owner>--<workspace>--<agent?>>",
|
||||
Hidden: true,
|
||||
Middleware: clibase.RequireNArgs(1),
|
||||
Handler: func(inv *clibase.Invocation) error {
|
||||
@@ -93,7 +93,7 @@ func (r *RootCmd) vscodeSSH() *clibase.Cmd {
|
||||
|
||||
parts := strings.Split(inv.Args[0], "--")
|
||||
if len(parts) < 3 {
|
||||
return xerrors.Errorf("invalid argument format. must be: coder-vscode--<owner>-<name>-<agent?>")
|
||||
return xerrors.Errorf("invalid argument format. must be: coder-vscode--<owner>--<name>--<agent?>")
|
||||
}
|
||||
owner := parts[1]
|
||||
name := parts[2]
|
||||
|
||||
Reference in New Issue
Block a user