Skip to content

Commit 93a233a

Browse files
authored
chore: write auto-update message after success (coder#12804)
1 parent d50c20c commit 93a233a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/ssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,11 +593,11 @@ func getWorkspaceAndAgent(ctx context.Context, inv *serpent.Invocation, client *
593593
_, _ = fmt.Fprintf(inv.Stderr, "Workspace was stopped, starting workspace to allow connecting to %q...\n", workspace.Name)
594594
_, err = startWorkspace(inv, client, workspace, workspaceParameterFlags{}, WorkspaceStart)
595595
if cerr, ok := codersdk.AsError(err); ok && cerr.StatusCode() == http.StatusForbidden {
596-
_, _ = fmt.Fprintln(inv.Stdout, "Unable to start the workspace with template version from last build. The auto-update policy may require you to restart with the current active template version.")
597596
_, err = startWorkspace(inv, client, workspace, workspaceParameterFlags{}, WorkspaceUpdate)
598597
if err != nil {
599598
return codersdk.Workspace{}, codersdk.WorkspaceAgent{}, xerrors.Errorf("start workspace with active template version: %w", err)
600599
}
600+
_, _ = fmt.Fprintln(inv.Stdout, "Unable to start the workspace with template version from last build. Your workspace has been updated to the current active template version.")
601601
} else if err != nil {
602602
return codersdk.Workspace{}, codersdk.WorkspaceAgent{}, xerrors.Errorf("start workspace with current template version: %w", err)
603603
}

0 commit comments

Comments
 (0)