From ba4b2d04d92d709a2fecc0c4195d2e6f9bd23e10 Mon Sep 17 00:00:00 2001 From: Paul Durivage Date: Thu, 19 Jun 2014 10:26:08 -0500 Subject: [PATCH] Fix logic to ensure state is either present or absent --- library/windows/win_feature.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/windows/win_feature.ps1 b/library/windows/win_feature.ps1 index d5d629a13d..cbb73789f4 100644 --- a/library/windows/win_feature.ps1 +++ b/library/windows/win_feature.ps1 @@ -37,8 +37,8 @@ Else { If ($params.state) { $state = $params.state.ToString().ToLower() - If (!($state -eq 'present') -or ($state -eq 'absent')) { - Fail-Json $result "state must be 'present' or 'absent'" + If (($state -ne 'present') -and ($state -ne 'absent')) { + Fail-Json $result "state is '$state'; must be 'present' or 'absent'" } }