-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Running the second example yields lot of these errors:
PS C:\Projects\PSTMigration> dir *.ps1 | New-Guard -TestPath {"./Tests/$($_.basename).Tests.ps1"}
Resolve-Path : Cannot evaluate parameter 'Path' because its argument is specified as a script block and there is no
input. A script block cannot be evaluated without input.
At C:\Projects\PowerShellGuard\PowerShellGuard.psm1:52 char:33
+ $TestPath = (resolve-path $TestPath).Path
+ ~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Resolve-Path], ParameterBindingException
+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.PowerShell.Commands.ResolvePathCommand
Adding ValueFromPipeline=$true to $Path does not solve the issue, it only changes the error to:
Resolve-Path : Cannot evaluate parameter 'Path' because its argument is specified as a script block and there is no
input. A script block cannot be evaluated without input.
At C:\Projects\PowerShellGuard\PowerShellGuard.psm1:52 char:33
+ $TestPath = (resolve-path $TestPath).Path
+ ~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Resolve-Path], ParameterBindingException
+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.PowerShell.Commands.ResolvePathCommand
Metadata
Metadata
Assignees
Labels
No labels