mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 09:13:12 +00:00
Merge pull request #11090 from jhawkesworth/powershell-to-json-compress
Add -Compress to ConvertTo-Json calls in common powershell code
This commit is contained in:
@@ -65,7 +65,7 @@ Function Exit-Json($obj)
|
||||
$obj = New-Object psobject
|
||||
}
|
||||
|
||||
echo $obj | ConvertTo-Json -Depth 99
|
||||
echo $obj | ConvertTo-Json -Compress -Depth 99
|
||||
Exit
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ Function Fail-Json($obj, $message = $null)
|
||||
|
||||
Set-Attr $obj "msg" $message
|
||||
Set-Attr $obj "failed" $true
|
||||
echo $obj | ConvertTo-Json -Depth 99
|
||||
echo $obj | ConvertTo-Json -Compress -Depth 99
|
||||
Exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user