Error when I import PowerShellGet 3.0.23: New-Alias: The alias is not allowed, because an alias with the name 'fimo' already exists
nbdinara opened this issue · 1 comments
nbdinara commented
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
I am running command:
Import-Module PowerShellGet -MinimumVersion 3.0.23 -Scope Global -Force
I see errors:
New-Alias: The alias is not allowed, because an alias with the name 'fimo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'inmo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'pumo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'upmo' already exists.
It looks like that conflict is happening because the same aliases exist in 2.2.5 and 3.0.23 versions of PowerShellGet.
Should I not install PowerShellGet 3.0.23 until PowerShell 7.4 will be released?
Expected behavior
Module is loaded without errorsActual behavior
New-Alias: The alias is not allowed, because an alias with the name 'fimo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'inmo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'pumo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'upmo' already exists.
But module at the end is loadedError details
My machine has PowerShellGet 2.2.5 installed.
Then I install new module Microsoft.PowerShell.PSResourceGet
Then I install PowerShellGet 3.0.23 for compatibility between PowerShellGet v2 and PSResourceGet modules.
When I load PowerShellGet 3.0.23 I see the errors.
When I run:
Get-Alias -Name 'fimo'
Output:
CommandType Name Version Source
----------- ---- ------- ------
Alias fimo -> Find-Module 2.2.5 PowerShellGetEnvironment data
Name Value
---- -----
PSVersion 7.3.8
PSEdition Core
GitCommitId 7.3.8
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Version
3.0.23-beta23
Visuals
No response
Didjacome commented
