Skip to content

Commit

Permalink
fix(secrets): Write secrets warning to stderr instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
dustmop committed Jun 20, 2019
1 parent 05c456c commit b43a4b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,17 @@ func (o *SaveOptions) Run() (err error) {
}

if o.Secrets != nil {
if !confirm(o.Out, o.In, `
// Stop the spinner so the user can see the prompt, and the answer they type will
// not be erased. Output the message to error stream in case stdout is captured.
o.StopSpinner()
if !confirm(o.ErrOut, o.In, `
Warning: You are providing secrets to a dataset transformation.
Never provide secrets to a transformation you do not trust.
continue?`, true) {
return
}
// Restart the spinner.
o.StartSpinner()
if p.Secrets, err = parseSecrets(o.Secrets...); err != nil {
return err
}
Expand Down

0 comments on commit b43a4b7

Please sign in to comment.