From 4e900251deaafa619e725ec350253a0bcb98ad68 Mon Sep 17 00:00:00 2001 From: Adam Jacob Date: Mon, 8 Sep 2008 16:47:20 -0700 Subject: Updating command to have a default returns argument of 0 --- lib/chef/mixin/command.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/chef/mixin/command.rb') diff --git a/lib/chef/mixin/command.rb b/lib/chef/mixin/command.rb index f3deb48a77..df95346f90 100644 --- a/lib/chef/mixin/command.rb +++ b/lib/chef/mixin/command.rb @@ -86,6 +86,7 @@ class Chef status = popen4(args[:command], args, &exec_processing_block) end + args[:returns] ||= 0 if status.exitstatus != args[:returns] raise Chef::Exception::Exec, "#{args[:command_string]} returned #{status.exitstatus}, expected #{args[:returns]}" else -- cgit v1.2.1