mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: 'coder update' should always start a workspace (#6437)
* fix: 'coder update' should always start a workspace
This commit is contained in:
Vendored
+1
-1
@@ -45,7 +45,7 @@ Workspace Commands:
|
||||
ssh Start a shell into a workspace
|
||||
start Start a workspace
|
||||
stop Stop a workspace
|
||||
update Update a workspace
|
||||
update Will update and start a given workspace if it is out of date.
|
||||
|
||||
Flags:
|
||||
--global-config coder Path to the global coder config directory.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Update a workspace
|
||||
Will update and start a given workspace if it is out of date. Use --always-prompt to change the parameter values of the workspace.
|
||||
|
||||
Usage:
|
||||
coder update <workspace> [flags]
|
||||
|
||||
+4
-2
@@ -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 {
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
+1
-1
@@ -50,6 +50,6 @@ coder [flags]
|
||||
| [<code>stop</code>](./cli/coder_stop) | Stop a workspace |
|
||||
| [<code>templates</code>](./cli/coder_templates) | Manage templates |
|
||||
| [<code>tokens</code>](./cli/coder_tokens) | Manage personal access tokens |
|
||||
| [<code>update</code>](./cli/coder_update) | Update a workspace |
|
||||
| [<code>update</code>](./cli/coder_update) | Will update and start a given workspace if it is out of date. |
|
||||
| [<code>users</code>](./cli/coder_users) | Manage users |
|
||||
| [<code>version</code>](./cli/coder_version) | Show coder version |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# coder update
|
||||
|
||||
Update a workspace
|
||||
Will update and start a given workspace if it is out of date. Use --always-prompt to change the parameter values of the workspace.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user