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)
350350 private bool TryGetShouldProcessValueFromAst ( FunctionInfo functionInfo , out bool hasShouldProcessSet )
351351 {
352352 // 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 ) ;
354354
355355 // Go through attributes on the parameter block, since this is where [CmdletBinding()] will be
356356 foreach ( AttributeAst attributeAst in functionBodyAst . ParamBlock . Attributes )
You can’t perform that action at this time.
0 commit comments