fix(cli): ssh: auto-update workspace (#11773)

This commit is contained in:
Marcin Tojek
2024-01-23 18:01:44 +01:00
committed by GitHub
parent 369821ea19
commit 77a4792ecd
5 changed files with 97 additions and 8 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ func (r *RootCmd) restart() *clibase.Cmd {
// It's possible for a workspace build to fail due to the template requiring starting
// workspaces with the active version.
if cerr, ok := codersdk.AsError(err); ok && cerr.StatusCode() == http.StatusForbidden {
_, _ = fmt.Fprintln(inv.Stdout, "Failed to restart with the template version from your last build. Policy may require you to restart with the current active template version.")
_, _ = fmt.Fprintln(inv.Stdout, "Unable to restart the workspace with the template version from the last build. Policy may require you to restart with the current active template version.")
build, err = startWorkspace(inv, client, workspace, parameterFlags, WorkspaceUpdate)
if err != nil {
return xerrors.Errorf("start workspace with active template version: %w", err)