Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repro for pester#353 in PowerShell 2.0. I wasn't able to reproduce this using a function for some reason, but mocking Start-Process does cause the error to occur. Incidentally, it's being caused by this line in MockPrototype: [object] $ArgumentList = Get-Variable -Name args -ValueOnly -Scope Local -ErrorAction $IgnoreErrorPreference It appears to be a problem when the mocked command also has an -ArgumentList parameter, which contains Validation attributes such as ValidateNotNullOrEmpty() (though why I wasn't able to reproduce this with a mocked function instead of Start-Process, I don't know.)
- Loading branch information