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

Skip to content

Commit 36a9bc3

Browse files
committed
fix: 'coder update' should always start a workspace
1 parent 973df19 commit 36a9bc3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/update.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ func update() *cobra.Command {
2020
Annotations: workspaceCommand,
2121
Use: "update <workspace>",
2222
Args: cobra.ExactArgs(1),
23-
Short: "Update a workspace",
23+
Short: "Will update and start a given workspace if it is out of date.",
24+
Long: "Will update and start a given workspace if it is out of date. Use --always-prompt to change " +
25+
"the parameter values of the workspace.",
2426
RunE: func(cmd *cobra.Command, args []string) error {
2527
client, err := CreateClient(cmd)
2628
if err != nil {
@@ -68,7 +70,7 @@ func update() *cobra.Command {
6870

6971
build, err := client.CreateWorkspaceBuild(cmd.Context(), workspace.ID, codersdk.CreateWorkspaceBuildRequest{
7072
TemplateVersionID: template.ActiveVersionID,
71-
Transition: workspace.LatestBuild.Transition,
73+
Transition: codersdk.WorkspaceTransitionStart,
7274
ParameterValues: buildParams.parameters,
7375
RichParameterValues: buildParams.richParameters,
7476
})

0 commit comments

Comments
 (0)