puppetlabs/facter — pull request #681 by cassianoleal (2014-05-21 16:45:32+00:00)
Title: Fix/facter 2/home expansion bug

This fixes [FACT-190](https://tickets.puppetlabs.com/browse/FACT-190).

One way to reproduce the issue is by running:

```shell
$ unset HOME
$ facter
/Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/util/config.rb:49:in `expand_path': couldn't find HOME environment -- expanding `~' (ArgumentError)
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/util/config.rb:49:in `setup_default_ext_facts_dirs'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/util/config.rb:60:in `'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/util/config.rb:5:in `'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/util/resolution.rb:2:in `'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/util/fact.rb:2:in `'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter.rb:35:in `'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter.rb:30:in `'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/lib/facter/application.rb:2:in `'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/cassiano/.gem/ruby/2.1.1/gems/facter-2.0.1-universal-darwin/bin/facter:14:in `'
from /Users/cassiano/.gem/ruby/2.1.1/bin/facter:23:in `load'
from /Users/cassiano/.gem/ruby/2.1.1/bin/facter:23:in `

'
```