fix win_unzip and win_share Powershell cmdlets output invalid JSONs (#42713)

This commit is contained in:
Avi Shefi 2018-07-13 07:03:57 +03:00 committed by Jordan Borean
commit b2527c55c3
2 changed files with 24 additions and 25 deletions

View file

@ -101,7 +101,7 @@ $ext = [System.IO.Path]::GetExtension($src)
If (-Not (Test-Path -LiteralPath $dest -PathType Container)){
Try{
New-Item -ItemType "directory" -path $dest -WhatIf:$check_mode
New-Item -ItemType "directory" -path $dest -WhatIf:$check_mode | out-null
} Catch {
Fail-Json -obj $result -message "Error creating '$dest' directory! Msg: $($_.Exception.Message)"
}
@ -180,5 +180,4 @@ If ($delete_archive){
}
$result.removed = $true
}
Exit-Json $result