Issue #20054 has been updated by Josh Cooper.

On Windows, the situation is worse:

<pre>
C:\work\facter>envpuppet facter virtual
Access is denied.
Using Facter::Util::Resolution.exec with a shell built-in is deprecated. Most 
built-ins can be replaced
with native ruby commands. If you really have to run a built-in, pass "cmd /c 
your_builtin" as a command
Could not retrieve virtual: undefined method `gsub' for nil:NilClass
vmware
</pre>

The problem is that we have another 'virtual' fact with weight 500, that tries 
to execute virt-what. It is not confined to environments where this executable 
is available. And due to commit 85654b06 we try to execute virt-what thinking 
it might be a shell built-in, and then trying to parse the 
Facter::Util::Resolution output, which is nil.

----------------------------------------
Bug #20054: virtual facts show error about gsub on nil
https://projects.puppetlabs.com/issues/20054#change-88005

* Author: Patrick Carlisle
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 1.7.0
* Keywords: 
* Branch: 
* Affected Facter version: 1.7.0-rc1
----------------------------------------
On my system, Debian sid, `facter virtual` and `facter is_virtual` display an 
error

    % facter virtual
    Could not retrieve virtual: undefined method `gsub' for nil:NilClass
    vmware_workstation

(I have vmware workstation installed but this system is not virtual so that 
return value seems wrong.)

    % facter is_virtual
    Could not retrieve virtual: undefined method `gsub' for nil:NilClass
    false


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to