Issue #3226 has been updated by Hailee Kenney.

Have functionality, but still need to consult UX team about user 
implementation. Current plan: 

Whitespace will now be stripped by default because this is the principle of 
least surprise. This does not change the behavior of any core facts. However, 
since the whitespace may be essential for some custom facts, it is possible to 
explicitly preserve whitespace by adding 'preserve_whitespace'. For example: 

<code>
<pre>
Facter.add(:iphostnumber) do
  confine :kernel => :darwin, :kernelrelease => "R6"
  setcode do
    %x{/usr/sbin/scutil --get LocalHostName}
  end
  preserve_whitespace
end
</pre>
</code>
----------------------------------------
Bug #3226: Facter not stripping trailing whitespace in at least the productname 
fact
https://projects.puppetlabs.com/issues/3226#change-62503

Author: Andrew Pollock
Status: Investigating
Priority: Normal
Assignee: Hailee Kenney
Category: interface
Target version: 
Keywords: 
Branch: 
Affected Facter version: 


irb(main):001:0> require 'facter'
=> true
irb(main):002:0> require 'pp'
=> true
irb(main):003:0> facts = Facter.to_hash
[REDACTED]
irb(main):004:0> facts['productname']
=> "Precision WorkStation T3400  "


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to