HomePhorge

(#11860) Add parameter to control locale override
2ea85ef38212Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#11860) Add parameter to control locale override

Puppet::Util.execute_posix contained some code that would override some locale-related environment variables in order to force the command being executed to produce well-known, consistent, predictably formatted output so that it could be parsed. However, there are some cases (such as a user-defined "exec" block) where we need to respect the system/user locale settings. Add a boolean parameter to the Puppet::Util.execute method that allows toggling this locale override behavior.

The "exec" provider now passes "false" for this value, meaning that we no longer override the locale for user-defined "exec" resources. Users may choose to override the locale themselves by specifying the appropriate locale-related vars in the "environment" section of their resource.

All of this is ignored on windows at the moment, but the parameter is passed in to "execute", which is responsible for calling "execute_windows" on windows systems. We could decide to do something with this parameter on windows at some point in the future.

Details

Provenance
Chris Price <chris@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUa6affa1b7051: Merge branch '2.7.x'
Branches
Unknown
Tags
Unknown

Event Timeline

Chris Price <chris@puppetlabs.com> committed rPU2ea85ef38212: (#11860) Add parameter to control locale override (authored by Chris Price <chris@puppetlabs.com>).Jan 26 2012, 1:08 AM