diff options
author | Matt Davis <mdavis@ansible.com> | 2016-11-29 14:19:51 -0800 |
---|---|---|
committer | Matt Davis <mdavis@ansible.com> | 2016-11-29 14:26:05 -0800 |
commit | b98fb5d1b3f2820e38cc739cd0c15afe5b2a9042 (patch) | |
tree | 2e35e71c9dbac602bd5ba1b623c4847f8d35793c | |
parent | 1a6a9ced61bf4ad2519351be53b15126f86f5821 (diff) | |
download | ansible-modules-core-b98fb5d1b3f2820e38cc739cd0c15afe5b2a9042.tar.gz |
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.
(cherry picked from commit 6890003c4f8dcd8f63a5b280211068cfaf1dcc35)
-rw-r--r-- | windows/win_command.ps1 | 2 | ||||
-rw-r--r-- | windows/win_shell.ps1 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/windows/win_command.ps1 b/windows/win_command.ps1 index 2a03b6a0..316654b8 100644 --- a/windows/win_command.ps1 +++ b/windows/win_command.ps1 @@ -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 diff --git a/windows/win_shell.ps1 b/windows/win_shell.ps1 index 850f2b95..664858e5 100644 --- a/windows/win_shell.ps1 +++ b/windows/win_shell.ps1 @@ -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 |