diff --git a/bin/git-format-staged b/bin/git-format-staged index 5195cfa..41d0829 100755 --- a/bin/git-format-staged +++ b/bin/git-format-staged @@ -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