Skip to content

Commit c81754e

Browse files
author
AJ Christensen
committed
Add Chef.fatal! class method
Spit a fatal log and exit with the given exit code. I'm lazy, sue me.
1 parent a3fb9da commit c81754e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

chef/lib/chef.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,11 @@
2828

2929
class Chef
3030
VERSION = '0.0.1'
31+
32+
class << self
33+
def fatal!(msg, err = -1)
34+
Chef::Log.fatal(msg)
35+
exit err
36+
end
37+
end
3138
end

0 commit comments

Comments
 (0)