PowerShell/PowerShellGetv2

Install-module does not install the latest version of dependencies

dolauli opened this issue · 2 comments

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

Modules used in my test.
Az 7.4.0(Depends on Az.Accounts (>= 2.7.5))

Test env
Latest PowerShell docker image

PowerShellGet
2.2.5

Reproduce steps
 xidi  docker run -it mcr.microsoft.com/powershell
PowerShell 7.3.8
PS /> Get-Module -Name Az.Accounts -ListAvailable
PS /> Install-Module -Name Az -RequiredVersion 7.4.0

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A

PS /> Get-Module -Name Az.Accounts -ListAvailable

Directory: /root/.local/share/powershell/Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 2.9.1 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave…}

PS /> Get-Module -Name PowerShellGet

ModuleType Version PreRelease Name ExportedCommands


Script 2.2.5 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability…}

Expected behavior

I expected the latest version (2.13.1) of Az.Accounts is installed.

Actual behavior

2.9.1 is installed, which is the latest 2.9.x version

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.8
PSEdition                      Core
GitCommitId                    7.3.8
OS                             Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

2.2.5

Visuals

No response

@dolauli sorry for the delayed response. We're aware of this issue and are working to resolve it

@dolauli sorry for the delayed response. We're aware of this issue and are working to resolve it

Is there any progress or ETA on this issue?