print success messages
This commit is contained in:
parent
dbff17e6ed
commit
2248565839
3 changed files with 10 additions and 1 deletions
|
|
@ -89,5 +89,10 @@ func removeRun(opts *RemoveOptions) error {
|
|||
return fmt.Errorf("failed to delete secret %s: %w", opts.SecretName, err)
|
||||
}
|
||||
|
||||
if opts.IO.IsStdoutTTY() {
|
||||
cs := opts.IO.ColorScheme()
|
||||
fmt.Fprintf(opts.IO.Out, "%s Removed secret %s\n", cs.SuccessIcon(), opts.SecretName)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ func NewCmdSecret(f *cmdutil.Factory) *cobra.Command {
|
|||
cmdutil.EnableRepoOverride(cmd, f)
|
||||
|
||||
cmd.AddCommand(cmdList.NewCmdList(f, nil))
|
||||
// TODO add success messages to these:
|
||||
cmd.AddCommand(cmdSet.NewCmdSet(f, nil))
|
||||
cmd.AddCommand(cmdRemove.NewCmdRemove(f, nil))
|
||||
|
||||
|
|
|
|||
|
|
@ -163,6 +163,11 @@ func setRun(opts *SetOptions) error {
|
|||
return fmt.Errorf("failed to set secret: %w", err)
|
||||
}
|
||||
|
||||
if opts.IO.IsStdoutTTY() {
|
||||
cs := opts.IO.ColorScheme()
|
||||
fmt.Fprintf(opts.IO.Out, "%s Set secret %s\n", cs.SuccessIcon(), opts.SecretName)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue