Print errors to stderr (#504)

This commit is contained in:
Nikolay Edigaryev
2023-05-18 19:11:22 +04:00
committed by GitHub
parent 59b3e0c0fb
commit cf49fd10b6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ struct Run: AsyncParsableCommand {
SentrySDK.capture(error: error)
SentrySDK.flush(timeout: 2.seconds.timeInterval)
print(error)
fputs("\(error)\n", stderr)
Foundation.exit(1)
}
+1 -1
View File
@@ -94,7 +94,7 @@ struct Root: AsyncParsableCommand {
// Handle a non-ArgumentParser's exception that requires a specific exit code to be set
if let errorWithExitCode = error as? HasExitCode {
print(error)
fputs("\(error)\n", stderr)
Foundation.exit(errorWithExitCode.exitCode)
}