Skip to content

Commit

Permalink
Use print and exit to repot error (#28)
Browse files Browse the repository at this point in the history
Using `fatalError` cannot be captured by a script that is used to integrate with build systems.
  • Loading branch information
neakor authored Apr 1, 2019
1 parent a82be50 commit b86f4b4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class ValidateCommand: AbstractCommand {
do {
try Validator().validate(from: sourceRootPaths, withSourcesListFormat: sourcesListFormat, excludingFilesEndingWith: excludeSuffixes, excludingFilesWithPaths: excludePaths, shouldCollectParsingInfo: shouldCollectParsingInfo, timeout: timeout, concurrencyLimit: concurrencyLimit)
} catch GenericError.withMessage(let message) {
fatalError(message)
print(message)
exit(1)
} catch {
fatalError("Unknown error: \(error)")
}
Expand Down

0 comments on commit b86f4b4

Please sign in to comment.