Skip to content

Commit 265672d

Browse files
authored
Merge pull request #98 from kasimon/patch-1
Improve home directory detection
2 parents d315776 + 4cb67c0 commit 265672d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-receive

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Puppet attempts to source ~/.puppet and will error if $HOME is not set
44
if [[ -z $HOME ]]
55
then
6-
HOME="$(grep "${USER}:" /etc/passwd | awk -F ':' '{print $6}')"
6+
HOME="$(getent passwd "${USER}" | awk -F ':' '{print $6}')"
77
export HOME
88
fi
99

0 commit comments

Comments
 (0)