Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
-
Night's Watch
-
2
-
ghost-11.11, ghost 25.11
-
Needs Assessment
-
Enhancement
-
Added log message when custom fact names are incompatible and a fact hierarchy cannot be created.
-
Needs Assessment
Description
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.