diff options
Diffstat (limited to 'lib/chef/knife/core/ui.rb')
-rw-r--r-- | lib/chef/knife/core/ui.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/knife/core/ui.rb b/lib/chef/knife/core/ui.rb index 03b11a1b4d..893daa04e9 100644 --- a/lib/chef/knife/core/ui.rb +++ b/lib/chef/knife/core/ui.rb @@ -140,6 +140,14 @@ class Chef log("#{color("FATAL:", :red, :bold)} #{message}") end + # Print a message describing a fatal error and exit 1 + # + # @param message [String] the text string + def fatal!(message) + fatal(message) + exit 1 + end + def color(string, *colors) if color? pastel.decorate(string, *colors) |