| Puppet Version: 7.10 The SemVerRange.new provides different signatures for defining an inclusive or exclusive semantic version range. The method that accepts min and max is inclusive by default, but it accepts a third parameter to make it exclusive. However, it doesn't work as specified (DOCUMENT-956) Desired Behavior: The following should print false:
notice(SemVer("2.0.0") =~ SemVerRange(SemVer("1.2.3"), SemVer("2.0.0"), false))
|
Actual Behavior: It prints true, just like if the parameter was omitted:
$ bx puppet apply -e 'notice(SemVer("2.0.0") =~ SemVerRange(SemVer("1.2.3"), SemVer("2.0.0"), false))' |
Notice: Scope(Class[main]): true |
$ bx puppet apply -e 'notice(SemVer("2.0.0") =~ SemVerRange(SemVer("1.2.3"), SemVer("2.0.0")))' |
Notice: Scope(Class[main]): true
|
A workaround is to use the signature that takes a non-empty string:
$ bx puppet apply -e 'notice(SemVer("2.0.0") =~ SemVerRange(">= 1.2.3 < 2.0.0"))' |
Notice: Scope(Class[main]): false
|
|