Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-552) Fix home directory evaluation
Prior to this commit the module would fail when executed under the context of systemd. This was because Dir.home tries to expand `~` when no UID is passed. However the HOME environment variable is not available when the agent is executed by systemd resulting in the following error: `Could not evaluate: couldn't find login name -- expanding ~` This commit fixes this by reverting to using Etc.getpwuid so that we can retrieve the home dir from the uid of the current process. For consistency, retrieval of home dirs for a given user has also been changed to use Etc.getpwnam.
- Loading branch information