Skip to content

Commit c75bfc2

Browse files
author
kborle
committed
Bug Fixes: Invoke-ScriptAnalyzer recognizes PSDrives and respects wildcard entries in -Path param.
1 parent c4b7690 commit c75bfc2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Engine/Commands/InvokeScriptAnalyzerCommand.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using System;
1515
using System.ComponentModel;
1616
using System.Collections.Generic;
17+
using System.Collections.ObjectModel;
1718
using System.Diagnostics.CodeAnalysis;
1819
using System.Globalization;
1920
using System.Linq;
@@ -159,9 +160,12 @@ protected override void BeginProcessing()
159160
/// </summary>
160161
protected override void ProcessRecord()
161162
{
162-
// throws Item Not Found Exception
163-
path = this.SessionState.Path.GetResolvedPSPathFromPSPath(path).First().ToString();
164-
ProcessPath(path);
163+
// throws Item Not Found Exception
164+
Collection<PathInfo> paths = this.SessionState.Path.GetResolvedPSPathFromPSPath(path);
165+
foreach (PathInfo p in paths)
166+
{
167+
ProcessPath(this.SessionState.Path.GetUnresolvedProviderPathFromPSPath(p.Path));
168+
}
165169
}
166170

167171
#endregion

0 commit comments

Comments
 (0)