Skip to content

Commit cf49fd1

Browse files
authored
Print errors to stderr (#504)
1 parent 59b3e0c commit cf49fd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/tart/Commands/Run.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ struct Run: AsyncParsableCommand {
209209
SentrySDK.capture(error: error)
210210
SentrySDK.flush(timeout: 2.seconds.timeInterval)
211211

212-
print(error)
212+
fputs("\(error)\n", stderr)
213213

214214
Foundation.exit(1)
215215
}

Sources/tart/Root.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct Root: AsyncParsableCommand {
9494

9595
// Handle a non-ArgumentParser's exception that requires a specific exit code to be set
9696
if let errorWithExitCode = error as? HasExitCode {
97-
print(error)
97+
fputs("\(error)\n", stderr)
9898

9999
Foundation.exit(errorWithExitCode.exitCode)
100100
}

0 commit comments

Comments
 (0)