Merge pull request #4298 from filecoin-project/fix/cli-stderr-errors

cli: Don't output errors to stdout
This commit is contained in:
Łukasz Magiera 2020-10-10 15:52:43 +02:00 committed by GitHub
commit ee8b8b8174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ func RunApp(app *cli.App) {
if os.Getenv("LOTUS_DEV") != "" {
log.Warnf("%+v", err)
} else {
fmt.Printf("ERROR: %s\n\n", err)
fmt.Fprintf(os.Stderr, "ERROR: %s\n\n", err) // nolint:errcheck
}
var phe *PrintHelpErr
if xerrors.As(err, &phe) {