Skip to content

Commit 9ccb746

Browse files
Explicitly compare count of match
Apparently on Windows PowerShell, 0 is not considered "false" but on PowerShell Core, it is... Signed-off-by: Gabriel Adrian Samfira <[email protected]>
1 parent e36ec25 commit 9ccb746

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell-yaml.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function Convert-ValueToProperType {
168168
}
169169
"tag:yaml.org,2002:float" {
170170
$parsedValue = 0.0
171-
if ($infinityRegex.Matches($Node.Value)) {
171+
if ($infinityRegex.Matches($Node.Value).Count -gt 0) {
172172
$prefix = $Node.Value.Substring(0, 1)
173173
switch ($prefix) {
174174
"-" {

0 commit comments

Comments
 (0)