|
Using Package provider Gem to install bundler-1.2.5 results on "Invalid byte sequence in US-ASCII". The locale in my machine is correct, en_GB.UTF-8, but when the execute the gem install, puppet changes it to US-ASCII, and fails with the "Invalid byte sequence..."
I have found that puppet overrides locales in util execution, but you can skip it by setting "override_locale". I not found any way to pass this. Removing this lines works perfectly.
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/execution.rb#L265
if (options[:override_locale]) then
|
# loop over them and clear them
|
Puppet::Util::POSIX::LOCALE_ENV_VARS.each { |name| ENV.delete(name) }
|
# set LANG and LC_ALL to 'C' so that the command will have consistent, predictable output
|
# it's OK to manipulate these directly rather than, e.g., via "withenv", because we are in
|
# a forked process.
|
ENV['LANG'] = 'C'
|
ENV['LC_ALL'] = 'C'
|
end
|
|