fix: do not ask for confirmation right after prompting for input

secret set, variable set, team create, webhook create and admin user
create asked a confirmation that defaults to No right after the user
typed the missing values, so pressing Enter discarded the input. They
now submit what the user entered; deletions still confirm.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 21:59:18 +02:00
1 parent fcfc497a77
commit b6b3ddc91b
6 files changed
+43 -29

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ func TestAdminPromptAndFlagsReachEquivalentPayloads(t *testing.T) {
require.NoError(t, Execute(context.Background(), deps, []string{"admin", "user", "create", "account", "--full-name", "Test Account"}))
require.Equal(t, []string{"email"}, prompt.asked)
require.Len(t, prompt.secrets, 2)
require.Len(t, prompt.confirmations, 1)
require.Empty(t, prompt.confirmations)
out.Reset()
require.NoError(t, Execute(context.Background(), deps, []string{"admin", "user", "create", "account", "--full-name", "Test Account", "--email", "account@example.test", "--password", " preserved password ", "--no-input"}))
require.Equal(t, payloads[0], payloads[1])