diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-01-07 06:57:26 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-01-12 11:48:48 -0800 |
commit | bb2723246872ee77343de88e295534942d7dd3c2 (patch) | |
tree | bc837689b45e89f034b4194fd529ee3286933d33 /lib/chef/mixin/shell_out.rb | |
parent | 55cdb2c6fa2f0e8a7da074862f95590f088719a2 (diff) | |
download | chef-bb2723246872ee77343de88e295534942d7dd3c2.tar.gz |
add forcing of LANG and LANGUAGE env vars
if we don't force LANGUAGE then package installs will still fail, etc
due to taking precedence over even LC_ALL, force LANG as well for
good measure which should cover all the bases hopefully.
Diffstat (limited to 'lib/chef/mixin/shell_out.rb')
-rw-r--r-- | lib/chef/mixin/shell_out.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index 5b05e788db..d3c14fa408 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -36,9 +36,15 @@ class Chef options[env_key] ||= {} options[env_key] = options[env_key].dup options[env_key]['LC_ALL'] ||= Chef::Config[:internal_locale] unless options[env_key].has_key?('LC_ALL') + options[env_key]['LANGUAGE'] ||= Chef::Config[:internal_locale] unless options[env_key].has_key?('LANGUAGE') + options[env_key]['LANG'] ||= Chef::Config[:internal_locale] unless options[env_key].has_key?('LANG') args << options else - args << { :environment => { 'LC_ALL' => Chef::Config[:internal_locale] } } + args << { :environment => { + 'LC_ALL' => Chef::Config[:internal_locale], + 'LANGUAGE' => Chef::Config[:internal_locale], + 'LANG' => Chef::Config[:internal_locale], + } } end shell_out_command(*args) |