2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 11:28:54 +00:00

Merge pull request 2108 from mholt/noexitprint

cmd: Don't exit if printing to stdout or stderr fails (closes #2102)
This commit is contained in:
Alexander Neumann 2018-12-15 21:34:18 +01:00
commit 0dd805421e

View File

@ -181,7 +181,6 @@ func Printf(format string, args ...interface{}) {
_, err := fmt.Fprintf(globalOptions.stdout, format, args...)
if err != nil {
fmt.Fprintf(os.Stderr, "unable to write to stdout: %v\n", err)
Exit(100)
}
}
@ -222,7 +221,6 @@ func Warnf(format string, args ...interface{}) {
_, err := fmt.Fprintf(globalOptions.stderr, format, args...)
if err != nil {
fmt.Fprintf(os.Stderr, "unable to write to stderr: %v\n", err)
Exit(100)
}
}