You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return"", fmt.Errorf("no eligible deployments found for this action")
61
+
}
62
+
63
+
// Non-interactive: auto-pick single, error on multiple
64
+
if!terminal.IsInteractive() {
65
+
iflen(deployments) ==1 {
66
+
returndeployments[0].ID, nil
67
+
}
68
+
return"", fmt.Errorf("multiple deployments found — use --deployment <id> to specify one\n\n To see your deployments, run:\n createos deployments list")
return"", fmt.Errorf("multiple deployments found — use --deployment <id> to specify one\n\n To see your deployments, run:\n createos deployments list")
return"", fmt.Errorf("multiple environments found — use --environment <id> to specify one\n\n To see your environments, run:\n createos environments list")
72
+
}
73
+
selected, err:=pterm.DefaultInteractiveSelect.
74
+
WithOptions(options).
75
+
WithDefaultText("Select an environment to promote to").
76
+
Show()
77
+
iferr!=nil {
78
+
return"", fmt.Errorf("could not read selection: %w", err)
0 commit comments