Repository navigation
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Interactive-IntelliSensetab completiontab completion
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
Given the full and only command line:
[
Pressing tab at the end of the buffer (right after the bracket) causes an error to be logged to $Error.
Expected behavior
No error to be logged to `$Error`, even if no completion is produced.Actual behavior
An error is logged to `$Error` right after pressing tab.Error details
Type : System.Management.Automation.CmdletInvocationException
ErrorRecord :
Exception :
Type : System.Management.Automation.WildcardPatternException
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : The specified wildcard character pattern is not valid: \[*
HResult : -2146233087
CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : RuntimeException
TargetSite :
Name : Parse
DeclaringType : System.Management.Automation.WildcardPatternParser, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
MemberType : Method
Module : System.Management.Automation.dll
Message : The specified wildcard character pattern is not valid: \[*
Source : System.Management.Automation
HResult : -2146233087
StackTrace :
at System.Management.Automation.WildcardPatternParser.Parse(WildcardPattern pattern, WildcardPatternParser parser)
at System.Management.Automation.WildcardPatternMatcher.MyWildcardPatternParser.Parse(WildcardPattern pattern, CharacterNormalizer characterNormalizer)
at System.Management.Automation.WildcardPatternMatcher..ctor(WildcardPattern wildcardPattern)
at System.Management.Automation.WildcardPattern.Init()
at System.Management.Automation.LocationGlobber.IsChildNameAMatch(PSObject childObject, WildcardPattern stringMatcher, Collection`1 includeMatcher, Collection`1 excludeMatcher, String& childName)
at System.Management.Automation.LocationGlobber.GenerateNewPSPathsWithGlobLeaf(List`1 currentDirs, PSDriveInfo drive, String leafElement, Boolean isLastLeaf, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.PathIntrinsics.GetResolvedPSPathFromPSPath(String path, CmdletProviderContext context)
at Microsoft.PowerShell.Commands.ResolvePathCommand.ProcessRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
CategoryInfo : NotSpecified: (:) [Resolve-Path], WildcardPatternException
FullyQualifiedErrorId : RuntimeException,Microsoft.PowerShell.Commands.ResolvePathCommand
InvocationInfo :
MyCommand : Resolve-Path
HistoryId : 2
InvocationName : Microsoft.PowerShell.Management\Resolve-Path
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock><End>, <No file>: line 38
PipelineIterationInfo :
TargetSite :
Name : Invoke
DeclaringType : System.Management.Automation.Runspaces.PipelineBase, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
MemberType : Method
Module : System.Management.Automation.dll
Message : The specified wildcard character pattern is not valid: \[*
InnerException :
Type : System.Management.Automation.WildcardPatternException
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : The specified wildcard character pattern is not valid: \[*
HResult : -2146233087
CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : RuntimeException
TargetSite :
Name : Parse
DeclaringType : System.Management.Automation.WildcardPatternParser, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
MemberType : Method
Module : System.Management.Automation.dll
Message : The specified wildcard character pattern is not valid: \[*
Source : System.Management.Automation
HResult : -2146233087
StackTrace :
at System.Management.Automation.WildcardPatternParser.Parse(WildcardPattern pattern, WildcardPatternParser parser)
at System.Management.Automation.WildcardPatternMatcher.MyWildcardPatternParser.Parse(WildcardPattern pattern, CharacterNormalizer characterNormalizer)
at System.Management.Automation.WildcardPatternMatcher..ctor(WildcardPattern wildcardPattern)
at System.Management.Automation.WildcardPattern.Init()
at System.Management.Automation.LocationGlobber.IsChildNameAMatch(PSObject childObject, WildcardPattern stringMatcher, Collection`1 includeMatcher, Collection`1 excludeMatcher, String& childName)
at System.Management.Automation.LocationGlobber.GenerateNewPSPathsWithGlobLeaf(List`1 currentDirs, PSDriveInfo drive, String leafElement, Boolean isLastLeaf, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.PathIntrinsics.GetResolvedPSPathFromPSPath(String path, CmdletProviderContext context)
at Microsoft.PowerShell.Commands.ResolvePathCommand.ProcessRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
Source : System.Management.Automation
HResult : -2146233087
StackTrace :
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at System.Management.Automation.PowerShellExecutionHelper.ExecuteCurrentPowerShell(Exception& exceptionThrown, IEnumerable input)
### Environment data
```powershell
Name Value
---- -----
PSVersion 7.2.4
PSEdition Core
GitCommitId 7.2.4
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
### Visuals
_No response_
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Interactive-IntelliSensetab completiontab completion
Activity
theJasonHelmick commentedon Jul 26, 2023
insomnimus - Thank you for reporting this issue. The Working Group has been able to reproduce this issue. We will look into this bug.
kilasuit commentedon Jul 26, 2023
I could reproduce this in the latest LTS (7.2.13) & Stable (7.3.6) and these returned the same error as provided by the user. Attempts in v7.4.0-preview4 and the latest daily, as Sean Wheeler (@sdwheeler) mentioned for me did not return this error so I think that this was recently fixed and therefore needs to be looked into which PR fixed this & whether this can be backported at all to both LTS and Stable versions.
I also then started another instance of each with
pwsh -noprofile -noninteractivein the above to rule out it just being within PSReadline & got the same error in LTS & Stable and no error in either 7.4.0-preview4 or the latest daily.All tested on
Microsoft Windows 10.0.25905MartinGC94 commentedon Jul 28, 2023
Ryan Yates (@kilasuit) It was probably fixed by this PR: #19489 which was pretty much a complete rewrite of the file completion logic. Backporting a huge change like that to LTS seems unrealistic, even if it is a very nice change (I would love if all my changes got backported to 5.1 as well 😁)
kilasuit commentedon Jul 28, 2023
Seeing as 7.4 will be the next LTS - I don't think it's too unrealistic to say that if that was the fix MartinGC94 that it's not planned for backporting - however that's up to the team to decide.
microsoft-github-policy-service commentedon Jan 26, 2024
This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.
Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.