Fix test failures in win_command/win_shell on Powershell 3

Switched to use Exit-Json to avoid JSON escaping bugs in ConvertTo-Json formatter without -Compress option.
pull/18777/head
Matt Davis 8 years ago committed by Matt Clay
parent 61060f4b5f
commit ce0412aa85

@ -158,4 +158,4 @@ $result.start = $start_datetime.ToString("yyyy-MM-dd hh:mm:ss.ffffff")
$result.end = $end_datetime.ToString("yyyy-MM-dd hh:mm:ss.ffffff")
$result.delta = $($end_datetime - $start_datetime).ToString("h\:mm\:ss\.ffffff")
ConvertTo-Json -Depth 99 $result
Exit-Json $result

@ -139,4 +139,4 @@ $result.start = $start_datetime.ToString("yyyy-MM-dd hh:mm:ss.ffffff")
$result.end = $end_datetime.ToString("yyyy-MM-dd hh:mm:ss.ffffff")
$result.delta = $($end_datetime - $start_datetime).ToString("h\:mm\:ss\.ffffff")
ConvertTo-Json -Depth 99 $result
Exit-Json $result

Loading…
Cancel
Save