Fix logic to ensure state is either present or absent

reviewable/pr18780/r1
Paul Durivage 11 years ago committed by Matt Martz
parent 376d1cc0a4
commit 03526456fa

@ -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'"
}
}

Loading…
Cancel
Save