You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Describe = 'Folder tempi present in the system'
Test = { test-path -path 'c:/temp' }
#Set = { new-item -ItemType Directory -Path 'c:/temp'}
}
)
c:/temp still is not created, but the command fail:
pplyRequirement : Failed to apply Requirement 'Folder tempi present in the system'
At C:\Program Files\WindowsPowerShell\Modules\Requirements\2.3.6\src\core.ps1:49 char:23
I hit this issue as well and wanted to add my observations for you/others that may stumble across this post
Basically, this is expected behavior. I think it would be great if the Readme was clearer in explaining this because we've obviously both missed it.
#54 was my guidance in suggesting that further tests should not be processed so the "apply error" is returned when exiting Invoke-Requirement once the test fails (and can't be remediated due to the lack of Set)
Side note that Test-Requirement does seem to process all Tests regardless of errors but wouldn't help if you want to use Set.
I'm not sure if this should be a separate feature request/post but when using Invoke-Requirement, it might be nice to have the option to suppress errors like this and return a "skipped" state or similar for tests that were not processed after an error occurs.
I think this might help with problems I'm having with format-checklist as well. When a failed requirement occurs the line below returns $null and then I get "Format-Checklist : Cannot index into a null array." when $nextFsm is subsequently used. Interestingly, this occurs even when using Test-Requirement.
Hi,
following your video i found this:
$requirements = @(
@{
)
c:/temp still is not created, but the command fail:
pplyRequirement : Failed to apply Requirement 'Folder tempi present in the system'
At C:\Program Files\WindowsPowerShell\Modules\Requirements\2.3.6\src\core.ps1:49 char:23
The text was updated successfully, but these errors were encountered: