PowerShell / PowerShell/vscode-powershell
Command Explorer lists multiple commands with the same name
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 1.9k
- Fork
- 547
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso dell’aggiornamento di Command Explorer e riproduci il problema con più versioni di PowerShellGet installate. Confronta i comandi restituiti con la pipeline Get-Command fornita; il lavoro è completato quando, aggiornando l’explorer, viene mostrata una sola istanza di ogni nome di comando.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, typescript
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100