Print exception message and exit 1
This commit is contained in:
parent
3c7bfbc437
commit
c738bc5eba
1 changed files with 7 additions and 2 deletions
|
@ -73,5 +73,10 @@ if !parameters[:formatter] || parameters[:patterns].empty?
|
|||
exit
|
||||
end
|
||||
|
||||
success = FormatStaged.run(**parameters)
|
||||
exit success ? 0 : 1
|
||||
begin
|
||||
success = FormatStaged.run(**parameters)
|
||||
exit success ? 0 : 1
|
||||
rescue RuntimeError => e
|
||||
puts "💣 Error: #{e.message}".red
|
||||
exit 1
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue