mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-01 03:31:18 +02:00
Print errors to stderr (#504)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user