Jira (FACT-3024) Facter.fact returns object when fact does not exist

0 views
Skip to first unread message

Gabriel Nagy (Jira)

unread,
Apr 21, 2021, 7:50:04 AM4/21/21
to puppe...@googlegroups.com
Gabriel Nagy created an issue
 
Facter / Bug FACT-3024
Facter.fact returns object when fact does not exist
Issue Type: Bug Bug
Affects Versions: FACT 4.1.0
Assignee: Unassigned
Created: 2021/04/21 4:49 AM
Priority: Normal Normal
Reporter: Gabriel Nagy

The behavior of Facter.fact has changed between 4.0.52 and 4.1.0. Instead of returning nil if a fact does not exist, it now returns an object of type ResolvedFact with its value set to nil.

The correct and documented behavior is to return nil if a fact does not exist:
https://github.com/puppetlabs/facter/blob/main/lib/facter.rb#L407-L408

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Gheorghe Popescu (Jira)

unread,
Apr 21, 2021, 9:21:03 AM4/21/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Apr 21, 2021, 9:28:02 AM4/21/21
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Fix Version/s: FACT 4.1.1

Claire Cadman (Jira)

unread,
Apr 22, 2021, 9:52:04 AM4/22/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages