PowerShell / PowerShell/vscode-powershell
Command Explorer lists multiple commands with the same name
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.9k
- Forks
- 548
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
System Details
System Details Output
### VSCode version: 1.31.0-insider 28e7467661d67c05c3662ff900ee1984f7e2fbcc x64
(node:27697) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
### VSCode extensions:
DavidAnson.vscode-markdownlint@0.23.0
EditorConfig.EditorConfig@0.12.6
eg2.tslint@1.0.42
ms-vscode.csharp@1.17.1
ms-vscode.PowerShell@1.10.2
msjsdiag.debugger-for-chrome@4.11.1
### PSES version: 1.10.2.0
### PowerShell version:
Name Value
---- -----
PSVersion 6.1.1
PSEdition Core
GitCommitId 6.1.1
OS Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
While working on an enhancement to the Command Explorer, I noticed a number of command names showed up twice. I also noted that they didn't duplicate in pwsh at the terminal. It appears they are being duplicated when you have multiple versions of the same module (in my case I have versions 1.6.7 and 2.0.3 of PowerShellGet installed).
I ran the command Microsoft.PowerShell.Core\Get-Command -CommandType @("Function","Cmdlet","ExternalScript") | Microsoft.PowerShell.Utility\Select-Object -Property @("Name","ModuleName") | Microsoft.PowerShell.Utility\Sort-Object -Property Name and I don't see the double commands.
Expected Behaviour
When refreshing the Command Explorer, should return a single instance of each command.
Actual Behaviour
Getting duplicate commands:

Attached Logs
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie am Einstiegspunkt für die Aktualisierung des Command Explorer und reproduzieren Sie das Problem, indem Sie mehrere Versionen von PowerShellGet installiert haben. Vergleichen Sie die zurückgegebenen Befehle mit der bereitgestellten Get-Command-Pipeline; abgeschlossen ist die Aufgabe, wenn beim Aktualisieren des Explorers nur eine Instanz jedes Befehlsnamens angezeigt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- powershell, typescript
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100