Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Evaluate confine block in case-insensitive way
Prior to this commit when a user provided a confine block, Facter would downcase the value when evaluating it. For example: confine :kernel do |value| value == "Linux" end While Facter's public documentation states that this is a valid way to write a confine block, it would incorrectly and unexpectedly evaluate as false on Linux systems. However, these other styles of confine would return true: confine :kernel => "Linux" confine kernel: "Linux" This downcasing behavior was introduced in 7a81945 as a way of comparing values in a case-insensitive way. However when block confines were introduced in e4c8689, it added block evaluation before value comparison, making the case-insensitive comparison moot with blocks. This commit retains existing behavior of evaluating a confine block with a downcased fact value, while adding evaluation with the raw fact value to ensure expected behavior.
- Loading branch information