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
Path is annotated with [ValueFromPipeline] so it should be possible to pipe records to it. But code in BeginProcessing tries to use the value of the path variable, which won't be set at that point if the paths to process are being pipelined.
Steps to reproduce
get-childitem*.ps1 |Invoke-ScriptAnalyzer
Expected behavior
Processes each of the files specified and produces analysis results for each one
Actual behavior
Error: Invoke-ScriptAnalyzer : Cannot process argument because the value of argument "path" is null. Change the
value of argument "path" to a non-null value.
PSMessageDetails :
Exception : System.Management.Automation.PSArgumentNullException: Cannot process argument because
the value of argument "path" is null. Change the value of argument "path" to a
non-null value.
at
System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String
path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider&
providerInstance)
at
System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String
path, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand
.ProcessPath()
at Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand
.BeginProcessing()
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
TargetObject :
CategoryInfo : InvalidArgument: (:) [Invoke-ScriptAnalyzer], PSArgumentNullException
FullyQualifiedErrorId : ArgumentNull,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzer
Command
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *
Path is annotated with [ValueFromPipeline] so it should be possible to pipe records to it. But code in BeginProcessing tries to use the value of the path variable, which won't be set at that point if the paths to process are being pipelined.
Steps to reproduce
Expected behavior
Actual behavior
If an unexpected error was thrown then please report the full error details using e.g.
$error[0] | Select-Object *
Environment data
The text was updated successfully, but these errors were encountered: