forked from puppetlabs/facter
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#12012) Remove global override of LANG environment variable
'LANG' environment variable must be set to 'C' in order to reliably parse output of certain commands when building up core Facter facts (to prevent locale differences from affecting the format of the output). However, it does not need to happen at a global-ish scope whenever facter is 'require'd; move this behavior from the facter.rb into the local scope of the Facter::Util::Resolution.exec method; restore original value of environment variable after executing any individual command. Note that, while this behavior is better than the previous behavior (global override), it is still not possible for a custom facter fact to be written to expect any other locale besides 'C'. Eventually might prefer to find a solution that allows callers to override this behavior if desired.
- Loading branch information
Chris Price
committed
Jan 20, 2012
1 parent
26918b3
commit 810c465
Showing
2 changed files
with
43 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters