Fixed --help (#361)

* Fixed --help

Apparently `--help` works via exceptions 🤷‍♂️

Fixes #360

* lint issue
This commit is contained in:
Fedor Korotkov 2022-12-17 11:57:17 -05:00 committed by GitHub
parent c3e37854c3
commit 9cdb7087f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,10 @@ struct Root: AsyncParsableCommand {
try command.run()
}
} catch {
if exitCode(for: error).rawValue == 0 {
exit(withError: error)
}
// Capture the error into Sentry
SentrySDK.capture(error: error)
SentrySDK.flush(timeout: 2.seconds.timeInterval)