-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#16137) Tilde expansion should only occur for normal users
The previous fix for #15185 caused File.expand_path to be called on the user default config and var directories even when running as root. This caused puppet starting as a service to fail because the HOME environment variable is not set when most services are started. This change ensures that the File.expand_path will only happen on a path with a '~' when we are running as a non-root user, in which case the HOME env var should always be there. As a part of untangling this code, this also teases apart the Windows path handling from the Unix path handling and allows us to use the more "Windowsy" path for the user's local directories.
- Loading branch information
Showing
4 changed files
with
134 additions
and
97 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
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