From 64f19fc4c67b4cc68da34b26789fb73cb90503db Mon Sep 17 00:00:00 2001 From: Tal Auslander Date: Sun, 28 Jun 2015 13:45:48 +0300 Subject: [PATCH] stop reading from url on error --- lib/ansible/modules/windows/win_get_url.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/windows/win_get_url.ps1 b/lib/ansible/modules/windows/win_get_url.ps1 index e5e1ea73c83..23463b681c0 100644 --- a/lib/ansible/modules/windows/win_get_url.ps1 +++ b/lib/ansible/modules/windows/win_get_url.ps1 @@ -62,7 +62,7 @@ Else { $stream = New-Object System.IO.StreamReader($response.GetResponseStream()) - $stream.ReadToEnd() | Set-Content -Path $dest -Force + $stream.ReadToEnd() | Set-Content -Path $dest -Force -ErrorAction Stop $result.changed = $true }