Skip to content

Commit

Permalink
Print errors to stderr (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev authored May 18, 2023
1 parent 59b3e0c commit cf49fd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/tart/Commands/Run.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/tart/Root.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit cf49fd1

Please sign in to comment.