Facter: Windows: Nothing returned from dir command
Facter 2.1.0 Puppet 3.7.4 OS: Windows 7
I'm having some weirdness. I've written several windows custom facts and this is by far the weirdest. I want my fact to have a list of all the userprofiles on a system. I did that successfully via the registry initially but that led to erroneous ones that didn't actually exist. So, I decided the simplest was to get the contents of C:\Users. Simplest command out there is dir. Well, I get the info I want when I manually run:
dir C:\Users /B
When I pass that same command to Facter:
Facter::Core::Execution.exec('dir C:\Users /B')
I get nothing. No error messages. Null.
Not sure where I went wrong.