Skip to content

Commit bf5daa3

Browse files
committed
exit with non-zero status code for errors
1 parent 80abc66 commit bf5daa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

run.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ def fuzz_function_exists?(file_path)
2020

2121
if ARGV.length != 1
2222
puts 'USAGE: fuzz.rb <FILE TO FUZZ>'
23-
exit
23+
exit(1)
2424
end
2525
file_path = ARGV[0].freeze
2626

2727
# TODO: ensure we don't load this file
2828
if !fuzz_function_exists?(file_path)
2929
puts "ERROR: `fuzz` function doesn’t exist in #{file_path}"
30-
exit
30+
exit(1)
3131
end
3232

3333
fork do
@@ -38,7 +38,7 @@ def fuzz_function_exists?(file_path)
3838
fuzz(Random.new.bytes(10))
3939
rescue => e
4040
puts "Encountered an exception: #{e}"
41-
exit
41+
exit(1)
4242
end
4343

4444
p Coverage.result

0 commit comments

Comments
 (0)