Print exception message and exit 1

This commit is contained in:
Sven Weidauer 2022-06-06 11:55:43 +02:00
parent 3c7bfbc437
commit c738bc5eba

View file

@ -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