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
Merge pull request #811 from qri-io/secrets-err
  • Loading branch information
b5 authored Jun 25, 2019
2 parents 05c456c + b43a4b7 commit 39e0932
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 39e0932

Please sign in to comment.