Skip to content

Help cmdlet fails in PS 6.1.0-preview.1 when StrictMode is enabled  #6497

@kborowinski

Description

@kborowinski

Steps to reproduce

Set-StrictMode -Version Latest
help

or

Set-StrictMode -Version Latest
man

Expected behavior

TOPIC                                                    
    PowerShell Help System                               
                                                         
SHORT DESCRIPTION                                        
    Displays help about PowerShell cmdlets and concepts. 
...

Actual behavior

PSMessageDetails      :
Exception             : System.Management.Automation.RuntimeException: The variable '$moreArgs' cannot be retrieved because it has not been set.
                           at System.Management.Automation.VariableOps.GetVariableValue(VariablePath variablePath, ExecutionContext executionContext, VariableExpressionAst varAst)
                           at System.Management.Automation.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame frame)
                           at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject          : moreArgs
CategoryInfo          : InvalidOperation: (moreArgs:String) [], RuntimeException
FullyQualifiedErrorId : VariableIsUndefined
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 24
                        at <ScriptBlock>, <No file>: line 69
                        at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}

Environment data

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.1
PSEdition                      Core
GitCommitId                    v6.1.0-preview.1
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Interactive-HelpSystemhelp infrastructure and formatting of help

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions