Skip to content

Commit 99afa05

Browse files
committed
change check of OS version in scp test
1 parent 59a1c22 commit 99afa05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regress/pesterTests/SCP.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Describe "Tests for scp command" -Tags "CI" {
180180
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath) (Get-ChildItem -path $DestinationFilePath) -Property Name, Length ).Length -eq 0
181181
$equal | Should Be $true
182182

183-
if($Options.contains("-p ") -and [System.Convert]::ToInt32((Get-WMIObject win32_operatingsystem).Version.Split(".")[0]) -ge 10)
183+
if($Options.contains("-p ") -and [environment]::OSVersion.Version.Major -ge 10)
184184
{
185185
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath).LastWriteTime.DateTime (Get-ChildItem -path $DestinationFilePath).LastWriteTime.DateTime ).Length -eq 0
186186
$equal | Should Be $true

0 commit comments

Comments
 (0)