Jira (FACT-2851) Failure when structured custom fact has

7 views
Skip to first unread message

Andrei Filipovici (Jira)

unread,
Nov 4, 2020, 10:31:03 AM11/4/20
to puppe...@googlegroups.com
Andrei Filipovici created an issue
 
Facter / Bug FACT-2851
Failure when structured custom fact has
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/11/04 7:30 AM
Priority: Normal Normal
Reporter: Andrei Filipovici

When creating a structured custom fact with:

# frozen_string_literal: true
 
Facter.add(:'my_fact.f1') do
  setcode do
    'f1_value'
  end
end
 
Facter.add(:'my_fact.f1.l1') do
  setcode do
    'f1_l1_value'
  end
end

When requesting for my_fact, facter fails with:

NoMethodError: undefined method `bury' for "f1_value":String
  /Users/andrei.filipovici/projects/facter_fork/lib/facter/models/fact_collection.rb:33:in `bury'

This happens because my_fact.f1.l1 tries to add a fact to my_fact.f1's value.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Andrei Filipovici (Jira)

unread,
Nov 4, 2020, 10:31:03 AM11/4/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages