You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading this code it looks like it takes windows into account.
# frozen_string_literal: true
Facter.add(:root_home) do
setcode do
require 'etc'
rescue LoadError
# Unavailable on platforms like Windows
else
Etc.getpwnam('root').dir
end
end
But I always get this error, whilst running on windows.
Error: Facter: Error while resolving custom fact fact='root_home', resolution='<anonymous>': undefined method `dir' for nil:NilClass
The text was updated successfully, but these errors were encountered:
That's interesting. From reading the source I figured etc would never be available on Windows, but it may be. Could you try out #1295 and approve if it works for you? I don't have a Windows setup to verify it.
Technically everyone can approve a PR. You need to go to the files tab. There's a big green "Review changes" button where you can approve. If you have permissions, the checkmark is green, otherwise it'll be grey. But a text is also fine. We're not that formal.
Reading this code it looks like it takes windows into account.
But I always get this error, whilst running on windows.
The text was updated successfully, but these errors were encountered: