Skip to content

Commit e7f9014

Browse files
committed
fix
1 parent 402ee07 commit e7f9014

File tree

8 files changed

+46
-5
lines changed

8 files changed

+46
-5
lines changed

agent/agent_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -2012,6 +2012,12 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati
20122012
if metadata.AgentID == uuid.Nil {
20132013
metadata.AgentID = uuid.New()
20142014
}
2015+
if metadata.AgentName == "" {
2016+
metadata.AgentName = "test-agent"
2017+
}
2018+
if metadata.WorkspaceName == "" {
2019+
metadata.WorkspaceName = "test-workspace"
2020+
}
20152021
coordinator := tailnet.NewCoordinator(logger)
20162022
t.Cleanup(func() {
20172023
_ = coordinator.Close()

cli/open.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (r *RootCmd) openVSCode() *clibase.Cmd {
4242
cmd := &clibase.Cmd{
4343
Annotations: workspaceCommand,
4444
Use: "vscode <workspace> [<directory in workspace>]",
45-
Short: "Open a workspace in Visual Studio Code.",
45+
Short: "Open a workspace in Visual Studio Code",
4646
Middleware: clibase.Chain(
4747
clibase.RequireRangeArgs(1, 2),
4848
r.InitClient(client),
@@ -168,9 +168,8 @@ func (r *RootCmd) openVSCode() *clibase.Cmd {
168168
_, _ = fmt.Fprintf(inv.Stderr, "Opening %s in %s is not supported inside a workspace, please open the following URI on your local machine instead:\n\n", openingPath, vscodeDesktopName)
169169
_, _ = fmt.Fprintf(inv.Stdout, "%s\n", u.String())
170170
return nil
171-
} else {
172-
_, _ = fmt.Fprintf(inv.Stderr, "Opening %s in %s\n", openingPath, vscodeDesktopName)
173171
}
172+
_, _ = fmt.Fprintf(inv.Stderr, "Opening %s in %s\n", openingPath, vscodeDesktopName)
174173

175174
if !testNoOpen {
176175
err = open.Run(u.String())

cli/testdata/coder_open_vscode_--help.golden

+7
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@ USAGE:
55

66
Open a workspace in Visual Studio Code
77

8+
OPTIONS:
9+
--generate-token bool, $CODER_OPEN_VSCODE_GENERATE_TOKEN
10+
Generate an auth token and include it in the vscode:// URI. This is
11+
for automagical configuration of VS Code Desktop and not needed if
12+
already configured. This flag does not need to be specified when
13+
running this command on a local machine unless automatic open fails.
14+
815
———
916
Run `coder --help` for a list of global options.

coderd/apidoc/docs.go

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/agents.md

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli/open_vscode.md

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)