Skip to content

Commit a53d6c1

Browse files
Fixed PowerShell version comparison
1 parent f3be482 commit a53d6c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GitHubCore.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ function Invoke-GHRestMethod
315315
# Disable Progress Bar in function scope during Invoke-WebRequest
316316
$ProgressPreference = 'SilentlyContinue'
317317

318-
if ($PSVersionTable.PSVersion -lt 7.0.0)
318+
if ($PSVersionTable.PSVersion -lt [version]"7.0.0")
319319
{
320320
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
321321
}
@@ -585,7 +585,7 @@ function Invoke-GHRestMethod
585585
}
586586
finally
587587
{
588-
if ($PSVersionTable.PSVersion -lt 7.0.0)
588+
if ($PSVersionTable.PSVersion -lt [version]"7.0.0")
589589
{
590590
[Net.ServicePointManager]::SecurityProtocol = $originalSecurityProtocol
591591
}

0 commit comments

Comments
 (0)