Skip to content

Commit eff1a40

Browse files
committed
print errors to STDERR, and exit abnormally
1 parent 839bc0c commit eff1a40

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/import_mails

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env ruby
22

3+
require 'pp'
34
require 'optparse'
45
require 'mail'
56
require 'mail/encodings/x_gzip64'
@@ -57,4 +58,7 @@ Message.transaction do
5758
end
5859
end
5960

60-
pp errors if errors.any?
61+
if errors.any?
62+
PP.pp errors, STDERR
63+
exit 1
64+
end

0 commit comments

Comments
 (0)