@@ -24,7 +24,7 @@ namespace Microsoft.PowerShell.PSResourceGet.Cmdlets
24
24
public sealed class FindPSResource : PSCmdlet
25
25
{
26
26
#region Members
27
-
27
+
28
28
private const string NameParameterSet = "NameParameterSet" ;
29
29
private const string CommandNameParameterSet = "CommandNameParameterSet" ;
30
30
private const string DscResourceNameParameterSet = "DscResourceNameParameterSet" ;
@@ -39,7 +39,7 @@ public sealed class FindPSResource : PSCmdlet
39
39
/// Specifies name of a resource or resources to find. Accepts wild card characters.
40
40
/// </summary>
41
41
[ SupportsWildcards ]
42
- [ Parameter ( Position = 0 ,
42
+ [ Parameter ( Position = 0 ,
43
43
ValueFromPipeline = true ,
44
44
ValueFromPipelineByPropertyName = true ,
45
45
ParameterSetName = NameParameterSet ) ]
@@ -167,7 +167,6 @@ protected override void ProcessRecord()
167
167
168
168
private void ProcessResourceNameParameterSet ( )
169
169
{
170
- WriteDebug ( "In FindPSResource::ProcessResourceNameParameterSet()" ) ;
171
170
// only cases where Name is allowed to not be specified is if Type or Tag parameters are
172
171
if ( ! MyInvocation . BoundParameters . ContainsKey ( nameof ( Name ) ) )
173
172
{
@@ -178,7 +177,7 @@ private void ProcessResourceNameParameterSet()
178
177
}
179
178
else if ( MyInvocation . BoundParameters . ContainsKey ( nameof ( Type ) ) )
180
179
{
181
- Name = new string [ ] { "*" } ;
180
+ Name = new string [ ] { "*" } ;
182
181
}
183
182
else
184
183
{
@@ -191,8 +190,8 @@ private void ProcessResourceNameParameterSet()
191
190
}
192
191
193
192
WriteDebug ( "Filtering package name(s) on wildcards" ) ;
194
- Name = Utils . ProcessNameWildcards ( Name , removeWildcardEntries : false , out string [ ] errorMsgs , out bool nameContainsWildcard ) ;
195
-
193
+ Name = Utils . ProcessNameWildcards ( Name , removeWildcardEntries : false , out string [ ] errorMsgs , out bool nameContainsWildcard ) ;
194
+
196
195
foreach ( string error in errorMsgs )
197
196
{
198
197
WriteError ( new ErrorRecord (
@@ -208,7 +207,7 @@ private void ProcessResourceNameParameterSet()
208
207
{
209
208
WriteDebug ( "Package name(s) could not be resolved" ) ;
210
209
return ;
211
- }
210
+ }
212
211
213
212
// determine/parse out Version param
214
213
VersionType versionType = VersionType . VersionRange ;
@@ -232,7 +231,7 @@ private void ProcessResourceNameParameterSet()
232
231
"IncorrectVersionFormat" ,
233
232
ErrorCategory . InvalidArgument ,
234
233
this ) ) ;
235
-
234
+
236
235
return ;
237
236
}
238
237
}
@@ -289,7 +288,7 @@ private void ProcessCommandOrDscParameterSet(bool isSearchingForCommands)
289
288
WriteDebug ( "Command or DSCResource name(s) could not be resolved" ) ;
290
289
return ;
291
290
}
292
-
291
+
293
292
foreach ( PSCommandResourceInfo cmdPkg in _findHelper . FindByCommandOrDscResource (
294
293
isSearchingForCommands : isSearchingForCommands ,
295
294
prerelease : Prerelease ,
@@ -325,7 +324,7 @@ private void ProcessTags()
325
324
WriteDebug ( "Tags(s) could not be resolved" ) ;
326
325
return ;
327
326
}
328
-
327
+
329
328
foreach ( PSResourceInfo tagPkg in _findHelper . FindByTag (
330
329
type : Type ,
331
330
prerelease : Prerelease ,
0 commit comments