File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ private bool SupportsShouldProcess(string cmdName)
350
350
private bool TryGetShouldProcessValueFromAst ( FunctionInfo functionInfo , out bool hasShouldProcessSet )
351
351
{
352
352
// Get the body of the function
353
- ScriptBlockAst functionBodyAst = ( ScriptBlockAst ) functionInfo . ScriptBlock . Ast . Find ( ast => ast is ScriptBlockAst , searchNestedScriptBlocks : false ) ;
353
+ ScriptBlockAst functionBodyAst = ( ScriptBlockAst ) functionInfo . ScriptBlock . Ast . Find ( ast => ast is ScriptBlockAst , searchNestedScriptBlocks : true ) ;
354
354
355
355
// Go through attributes on the parameter block, since this is where [CmdletBinding()] will be
356
356
foreach ( AttributeAst attributeAst in functionBodyAst . ParamBlock . Attributes )
You can’t perform that action at this time.
0 commit comments