diff --git a/CHANGELOG.md b/CHANGELOG.md index fee2c2c2..20f40056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog ## 2.0.1 -Bug fix +Bug fixes - Resolved Publish-Module doesn't report error but fails to publish module (#316) +- Resolved CommandAlreadyAvailable error while installing the latest version of PackageManagement module (#333) ## 2.0.0 Breaking Change diff --git a/PowerShellGet/PowerShellGet.psd1 b/PowerShellGet/PowerShellGet.psd1 index e8bad743..38a48250 100644 --- a/PowerShellGet/PowerShellGet.psd1 +++ b/PowerShellGet/PowerShellGet.psd1 @@ -55,8 +55,9 @@ PrivateData = @{ LicenseUri = 'https://go.microsoft.com/fwlink/?LinkId=829061' ReleaseNotes = @' ## 2.0.1 -Bug fix +Bug fixes - Resolved Publish-Module doesn't report error but fails to publish module (#316) +- Resolved CommandAlreadyAvailable error while installing the latest version of PackageManagement module (#333) ## 2.0.0 diff --git a/PowerShellGet/private/functions/Validate-ModuleCommandAlreadyAvailable.ps1 b/PowerShellGet/private/functions/Validate-ModuleCommandAlreadyAvailable.ps1 index 2f153ed5..4e5ae0f1 100644 --- a/PowerShellGet/private/functions/Validate-ModuleCommandAlreadyAvailable.ps1 +++ b/PowerShellGet/private/functions/Validate-ModuleCommandAlreadyAvailable.ps1 @@ -56,6 +56,7 @@ function Validate-ModuleCommandAlreadyAvailable -WarningAction SilentlyContinue | Microsoft.PowerShell.Core\Where-Object { ($CommandNames -contains $_.Name) -and ($_.ModuleName -ne $script:PSModuleProviderName) -and + ($_.ModuleName -ne 'PSModule') -and ($_.ModuleName -ne $CurrentModuleInfo.Name) } if($AvailableCommands) {