-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
completionText, listItemText and toolTip are considered $null when is a empty string
This is undocumented and confusing.
[System.Management.Automation.CompletionResult]::new(
'foo', # completionText
'foo', # listItemText
[System.Management.Automation.CompletionResultType]::ParameterValue,
'' # toolTip
)MethodInvocationException: Exception calling ".ctor" with "4" argument(s): "Cannot process argument because the value of argument "toolTip" is null. Change the
value of argument "toolTip" to a non-null value."
Expected behavior
Correct error messageActual behavior
empty string is considered nullError details
Environment data
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime