We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acc5c0f commit f0b97e4Copy full SHA for f0b97e4
cmd/lk/agent.go
@@ -973,6 +973,25 @@ func updateAgentSecrets(ctx context.Context, cmd *cli.Command) error {
973
return err
974
}
975
976
+ var confirmOverwrite bool
977
+ if cmd.Bool("overwrite") {
978
+ if err := huh.NewForm(
979
+ huh.NewGroup(
980
+ huh.NewConfirm().
981
+ Title(fmt.Sprintf("This will remove all existing secrets. Are you sure you want to proceed [%s]?", agentID)).
982
+ Value(&confirmOverwrite).
983
+ Inline(false).
984
+ WithTheme(util.Theme),
985
+ ),
986
+ ).Run(); err != nil {
987
+ return err
988
+ }
989
990
+
991
+ if !confirmOverwrite {
992
+ return nil
993
994
995
req := &lkproto.UpdateAgentSecretsRequest{
996
AgentId: agentID,
997
Secrets: secrets,
0 commit comments