Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PUP-9194) Use the cwd param. for check commands (e.g. unless, onlyif)
PUP-6919 introduced a regression where check commands like unless and onlyif no longer respected the cwd parameter. Instead, they would always execute in the pwd. The regression came about due to a misinterpretation of the code in the original base Exec provider. Specifically, the base Exec provider was cleaned up to utilize the newly added :cwd option in Puppet::Util::Execution.execute. The cleanup tried to preserve the original semantics of the code, but ended up mistaking an unless statement for an if statement, which made it seem like a check command did not use the cwd parameter (when, in fact, it did). This commit fixes the base Exec provider to now use the cwd parameter for check commands. It also updates the acceptance tests with this change.
- Loading branch information
Showing
2 changed files
with
11 additions
and
23 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