Closed glatzert closed 7 years ago
I think being able to provide the path to a module outside of your PSModulePath
is a valid use case. Feel free to send in PR.
Support should also be added to Invoke-OperationValidation
as you can run that cmdlet directly without first getting the tests via Get-OperationValidation
. Perhaps a parameter name of ModulePath
?
@glatzert Check out the feat/literalpath branch I just committed which adds support for this. This basically makes it so using the -ModuleName
parameter tells OVF to search in $env:PSModulePath
(current behaviour). Using -Path
or -LiteralPath
tells OVF to search in specific paths for the modules.
ModuleName
,Path
, andLiteralPath
are separate parameter sets so only work will work at a time.
Using -Path
(globbing is supported)
$tests = gi '.\mycustommodulepath' | Get-OperationValidation
$tests = Get-OperationValidation -Path '.\mycustommod*'
Using -LiteralPath
$tests = Get-OperationValidation -LiteralPath '.\mycustommodulepath'
Using -Path
(globbing is supported)
$results = gi '.\mycustommodulepath' | Invoke-OperationValidation
$results = Invoke-OperationValidation -Path '.\mycustommodulepath'
Using -LiteralPath
$results = Invoke-OperationValidation -LiteralPath '.\mycustommodulepath'
@devblackops that really looks promising for my use case 👍 I hope, i'll have time to check it out this week.
Fixed in #26
Since I stumbled upon this yesterday (#19), I took a look into
Get-OperationValidation
and I think it's very easy to allow LiteralPaths as a second Parameter-Set.I'd be happy to provide an appropriate PR, if you'd consider this to be a use case for OV.