Skip to content

Commit

Permalink
Raise exception on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Jan 30, 2024
1 parent 5cf705c commit 406787c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gem/exe/repo
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ module RBICentral
if success
log("Running Sorbet on gem...")
$stderr.puts
success &= system("cd gem && bin/typecheck")
success &= system("cd gem && bin/typecheck", exception: true)
$stderr.puts
log("Running Rubocop on gem...")
$stderr.puts
success &= system("cd gem && bin/style")
success &= system("cd gem && bin/style", exception: true)
$stderr.puts
log("Running gem tests...")
$stderr.puts
success &= system("cd gem && bin/test")
success &= system("cd gem && bin/test", exception: true)
$stderr.puts
end
unless success
Expand Down
2 changes: 1 addition & 1 deletion gem/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

$stderr.puts("Running pre-push validation...\n\n")

unless system("bundle exec repo check --ref main")
unless system("bundle exec repo check --ref main", exception: true)
$stderr.puts("\nSome checks have failed, cancelling the push (see above)".red)
exit(1)
end
Expand Down

0 comments on commit 406787c

Please sign in to comment.