Remove an unnecessary Find-Module call in AWS.Tools.Installer.
Expected Behavior
The PowerShell Gallery should not be queried again after selecting the version to install.
Current Behavior
When multiple versions are found for the specified modules, the minimum version is selected, and then another series of Find-Module is run to query the PowerShell Gallery for each specified module, which is unnecessary and slow. If the intent is to test whether the selected version is supported for all specified modules, this could be tested using the module object array in the $savedModules variable that was populated immediately before.
Possible Solution
Remove the following code block in AWS.Tools.Installer.psm1:
Remove an unnecessary
Find-Module
call in AWS.Tools.Installer.Expected Behavior
The PowerShell Gallery should not be queried again after selecting the version to install.
Current Behavior
When multiple versions are found for the specified modules, the minimum version is selected, and then another series of
Find-Module
is run to query the PowerShell Gallery for each specified module, which is unnecessary and slow. If the intent is to test whether the selected version is supported for all specified modules, this could be tested using the module object array in the$savedModules
variable that was populated immediately before.Possible Solution
Remove the following code block in AWS.Tools.Installer.psm1:
Context
Slows things down unnecessarily when multiple versions are found for the requested modules.
Your Environment
Include as many relevant details about the environment where the bug was discovered.
Get-AWSPowerShellVersion
: 1.0.0.1$PSVersionTable.OS
: Microsoft Windows 10.0.17763$PSVersionTable.PSEdition
: Core