Skip to content

Commit ef733aa

Browse files
authored
Merge pull request #1295 from ekohl/fix-etc-available-on-windows
Safely handle a missing root user
2 parents a2dfdba + 298dc62 commit ef733aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/facter/root_home.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
rescue LoadError
77
# Unavailable on platforms like Windows
88
else
9-
Etc.getpwnam('root').dir
9+
Etc.getpwnam('root')&.dir
1010
end
1111
end

0 commit comments

Comments
 (0)