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

Skip to content

fix: 'coder update' should always start a workspace #6437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: 'coder update' should always start a workspace
  • Loading branch information
Emyrk committed Mar 3, 2023
commit 36a9bc3ae62b05d67eef6dfb20138fe0d9fafab8
6 changes: 4 additions & 2 deletions cli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ func update() *cobra.Command {
Annotations: workspaceCommand,
Use: "update <workspace>",
Args: cobra.ExactArgs(1),
Short: "Update a workspace",
Short: "Will update and start a given workspace if it is out of date.",
Long: "Will update and start a given workspace if it is out of date. Use --always-prompt to change " +
"the parameter values of the workspace.",
RunE: func(cmd *cobra.Command, args []string) error {
client, err := CreateClient(cmd)
if err != nil {
Expand Down Expand Up @@ -68,7 +70,7 @@ func update() *cobra.Command {

build, err := client.CreateWorkspaceBuild(cmd.Context(), workspace.ID, codersdk.CreateWorkspaceBuildRequest{
TemplateVersionID: template.ActiveVersionID,
Transition: workspace.LatestBuild.Transition,
Transition: codersdk.WorkspaceTransitionStart,
ParameterValues: buildParams.parameters,
RichParameterValues: buildParams.richParameters,
})
Expand Down