Skip to content

Commit 78492f6

Browse files
committed
print error messages stderr
1 parent 8e815d3 commit 78492f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/putio-sync/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ func main() {
118118
err = putiosync.Sync(ctx, config)
119119
var configError *putiosync.ConfigError
120120
if errors.As(err, &configError) {
121-
fmt.Println(configError.Reason)
121+
fmt.Fprintln(os.Stderr, configError.Reason)
122122
os.Exit(exitCodeConfigError)
123123
return
124124
}
125125
if errors.Is(err, putiosync.ErrInvalidCredentials) {
126-
fmt.Println(err.Error())
126+
fmt.Fprintln(os.Stderr, err.Error())
127127
os.Exit(exitCodeInvalidCredentials)
128128
return
129129
}

0 commit comments

Comments
 (0)