We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59a1c22 commit 99afa05Copy full SHA for 99afa05
regress/pesterTests/SCP.Tests.ps1
@@ -180,7 +180,7 @@ Describe "Tests for scp command" -Tags "CI" {
180
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath) (Get-ChildItem -path $DestinationFilePath) -Property Name, Length ).Length -eq 0
181
$equal | Should Be $true
182
183
- if($Options.contains("-p ") -and [System.Convert]::ToInt32((Get-WMIObject win32_operatingsystem).Version.Split(".")[0]) -ge 10)
+ if($Options.contains("-p ") -and [environment]::OSVersion.Version.Major -ge 10)
184
{
185
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath).LastWriteTime.DateTime (Get-ChildItem -path $DestinationFilePath).LastWriteTime.DateTime ).Length -eq 0
186
0 commit comments