From 46503c6d1fe57d4f3ef5981c28956aa565f82688 Mon Sep 17 00:00:00 2001 From: JimFicarra Date: Sat, 4 Feb 2017 03:32:06 -0500 Subject: [PATCH] win_msi:Fixing Issue #20315 - shows changed even when msi not found (#20358) * win_msi #20315 - shows changed even when msi not found * make brace placement consistent --- lib/ansible/modules/windows/win_msi.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/windows/win_msi.ps1 b/lib/ansible/modules/windows/win_msi.ps1 index 07126583d1f..abb778036cf 100644 --- a/lib/ansible/modules/windows/win_msi.ps1 +++ b/lib/ansible/modules/windows/win_msi.ps1 @@ -37,6 +37,10 @@ if (($creates -ne $null) -and ($state -ne "absent") -and (Test-Path $creates)) { Exit-Json $result } +if (-not (Test-Path $path)) { + Fail-Json $result "Cannot find $path." +} + $logfile = [IO.Path]::GetTempFileName() if ($state -eq "absent") {