Skip to content

Commit a5c623c

Browse files
authored
fix(cmd): Change tense for deletion of active context (#1412)
"You are deleting" implies that I can abort the action somehow. In other user interfaces, it's common to end sentences like this with "Are you sure?". Given that the hcloud CLI doesn't do this and happily deletes the context, I changed the wording to indicate that the action was executed.
1 parent ecd8d42 commit a5c623c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/cmd/context/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func runDelete(s state.State, _ *cobra.Command, args []string) error {
3434
return fmt.Errorf("context not found: %v", name)
3535
}
3636
if cfg.ActiveContext() == context {
37-
_, _ = fmt.Fprintln(os.Stderr, "Warning: You are deleting the currently active context. Please select a new active context.")
37+
_, _ = fmt.Fprintln(os.Stderr, "Warning: You deleted the currently active context. Please select a new active context.")
3838
cfg.SetActiveContext(nil)
3939
}
4040
config.RemoveContext(cfg, context)

internal/cmd/context/delete_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ token = "super secret token"
3737
name: "delete active context",
3838
args: []string{"my-context"},
3939
config: testConfig,
40-
expErr: "Warning: You are deleting the currently active context. Please select a new active context.\n",
40+
expErr: "Warning: You deleted the currently active context. Please select a new active context.\n",
4141
expOut: `active_context = ""
4242
4343
[[contexts]]

0 commit comments

Comments
 (0)