1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add -Compress to ConvertTo-Json calls in common powershell code

This commit is contained in:
Jon Hawkesworth 2015-05-29 14:50:08 +01:00
parent ac14ad1419
commit 9371c38af9

View file

@ -65,7 +65,7 @@ Function Exit-Json($obj)
$obj = New-Object psobject $obj = New-Object psobject
} }
echo $obj | ConvertTo-Json -Depth 99 echo $obj | ConvertTo-Json -Compress -Depth 99
Exit Exit
} }
@ -89,7 +89,7 @@ Function Fail-Json($obj, $message = $null)
Set-Attr $obj "msg" $message Set-Attr $obj "msg" $message
Set-Attr $obj "failed" $true Set-Attr $obj "failed" $true
echo $obj | ConvertTo-Json -Depth 99 echo $obj | ConvertTo-Json -Compress -Depth 99
Exit 1 Exit 1
} }