File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,12 @@ public List<ExternalRule> GetExternalRule(string[] moduleNames)
231
231
string script = string . Format ( CultureInfo . CurrentCulture , "Get-Module -Name '{0}' -ListAvailable" , moduleName ) ;
232
232
shortModuleName = posh . AddScript ( script ) . Invoke < PSModuleInfo > ( ) . First ( ) . Name ;
233
233
234
+ // Invokes Update-Help for this module
235
+ // Required since when invoking Get-Help later on, the cmdlet prompts for Update-Help interactively
236
+ // By invoking Update-Help first, Get-Help will not prompt for downloading help later
237
+ script = string . Format ( CultureInfo . CurrentCulture , "Update-Help -Module '{0}' -Force" , shortModuleName ) ;
238
+ posh . AddScript ( script ) . Invoke ( ) ;
239
+
234
240
// Invokes Get-Command and Get-Help for each functions in the module.
235
241
script = string . Format ( CultureInfo . CurrentCulture , "Get-Command -Module '{0}'" , shortModuleName ) ;
236
242
var psobjects = posh . AddScript ( script ) . Invoke ( ) ;
You can’t perform that action at this time.
0 commit comments