Fixed --help (#361)

* Fixed --help

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

Fixes #360

* lint issue
This commit is contained in:
Fedor Korotkov
2022-12-17 20:57:17 +04:00
committed by GitHub
parent c3e37854c3
commit 9cdb7087f2
+4
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)