diff --git a/lib/facter/root_home.rb b/lib/facter/root_home.rb index 0e1764254..c44d64a7b 100644 --- a/lib/facter/root_home.rb +++ b/lib/facter/root_home.rb @@ -6,6 +6,6 @@ rescue LoadError # Unavailable on platforms like Windows else - Etc.getpwnam('root').dir + Etc.getpwnam('root')&.dir end end