Pester
Pester copied to clipboard
Allowing Mock to mock non-existing executables
Checklist
- [x] Feature request has a meaningful title
- [x] I have searched the existing issues. See all issues
- [x] I have tested using the latest version of Pester. See Installation and update guide.
Summary of the feature request
We have a situation where we want to Mock some executable (in our case kubectl.exe). We noticed that Mock fails when the executable cannot be found in the path. I understand this behavior for regular commands (where you need the existing commands for parameter validation etc.), but for executables this should not be necessary imo.
Maybe Mock could have a switch parameter that disables the checking for existing commands in general?
How should it work?
Probably give Mock a switch like -NonExistingCommand that disables any copying of existing parameters and the like and allows us to mock non-existing executables.