When creating a structured custom fact with:
# frozen_string_literal: true
Facter.add(:'my_fact.f1') do
setcode do
'f1_value'
end
Facter.add(:'my_fact.f1.l1') do
'f1_l1_value'
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.