From 103efa90376a706c3448db20a515c3992b0a8610 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Fri, 1 Nov 2024 10:58:06 +1100 Subject: [PATCH] fix: secret set pw prompt fixes: #3231 --- frontend/cli/cmd_secret.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/cli/cmd_secret.go b/frontend/cli/cmd_secret.go index 4fa777a7f1..6781ff752b 100644 --- a/frontend/cli/cmd_secret.go +++ b/frontend/cli/cmd_secret.go @@ -15,6 +15,7 @@ import ( ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" cf "github.com/TBD54566975/ftl/internal/configuration" "github.com/TBD54566975/ftl/internal/projectconfig" + "github.com/TBD54566975/ftl/internal/terminal" ) type secretCmd struct { @@ -116,6 +117,8 @@ type secretSetCmd struct { } func (s *secretSetCmd) Run(ctx context.Context, scmd *secretCmd, projConfig projectconfig.Config) error { + // We don't need the terminal status display, and it does not currently handle partial line writes + terminal.FromContext(ctx).Close() // Prompt for a secret if stdin is a terminal, otherwise read from stdin. ctx, adminClient, err := setUpAdminClient(ctx, projConfig) if err != nil {