summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/shell_out.rb
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-06-25 09:16:22 -0700
committerClaire McQuin <claire@getchef.com>2014-06-27 12:43:54 -0700
commitc94c7f4a3240531a15d85b9fca732adff5e47838 (patch)
tree35922d961021ccaebc9196de5d12b17ebe93b3e9 /lib/chef/mixin/shell_out.rb
parentb4ab3059da0b0be83525298bc7db9c64ebee2573 (diff)
downloadchef-c94c7f4a3240531a15d85b9fca732adff5e47838.tar.gz
Fix shell_out_with_systems_locale logic, add specs.
Diffstat (limited to 'lib/chef/mixin/shell_out.rb')
-rw-r--r--lib/chef/mixin/shell_out.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb
index 871a11749e..3f8b37a199 100644
--- a/lib/chef/mixin/shell_out.rb
+++ b/lib/chef/mixin/shell_out.rb
@@ -46,11 +46,11 @@ class Chef
def shell_out_with_systems_locale(*command_args)
if command_args.last.is_a?(Hash)
- command_args[:environment] ||= {}
- command_args[:environment]['LC_ALL'] ||= nil
+ command_args.last[:environment] ||= {}
+ command_args.last[:environment]['LC_ALL'] ||= ENV['LC_ALL']
shell_out(*command_args)
else
- shell_out(*command_args, :environment => {'LC_ALL' => nil})
+ shell_out(*command_args, :environment => {'LC_ALL' => ENV['LC_ALL']})
end
end