Commit 47a729a
committed
(FACT-3433) Log error if external fact is invalid
Prior to this commit, when Facter attempted to load an external fact
that used a non-hash data type, it would cause a fatal exception.
This commit updates Facter to validate whether an external fact is a
non-empty hash and, if it isn't, logs an error. This brings Facter 4
behavior more in line with Facter 3.
This commit also updates the debug message for structured data facts
that are the wrong filetype or empty to provide more useful debug
information.1 parent 81045e8 commit 47a729a
File tree
2 files changed
+31
-1
lines changed- lib/facter/custom_facts/util
- spec/custom_facts/util
2 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
49 | 74 | | |
50 | 75 | | |
51 | 76 | | |
| |||
0 commit comments