-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Description
When I use Install.AWSToolsModule
in a PowerShell 7 session to install a module (e.g. AWS.Tools.SQS) with the -CleanUp
parameter specified (to remove old versions), it installs the module (4.1.38 at the time of this writing) and dependencies...and then immediately uninstalls the very same versions.
NOTE - THIS APPEARS TO WORK IN POWERSHELL 5
Reproduction Steps
- Open Windows Terminal to a PowerShell 7 session.
- Run
Install-AWSToolsModule AWS.Tools.SQS -Force -SkipUpdate -SkipPublisherCheck -CleanUp
- Expected behavior - the module(s) install and can be used.
- Actual behavior - the module(s) are installed and then immediately uninstalled.
- Example (copied right from Posh session):
PS ❯ Install-AWSToolsModule AWS.Tools.SQS -Force -SkipUpdate -SkipPublisherCheck -CleanUp
Package source with Name: AWSToolsTemp added successfully.
Installing module AWS.Tools.SQS version 4.1.38
Package source with Name: AWSToolsTemp removed successfully.
Uninstalling AWS.Tools version 4.1.38
Uninstalling module AWS.Tools.SQS
Uninstalling module AWS.Tools.Common
So, of course attempting to use module functions at that point fails with an error similar to the following: The term 'Get-SQSQueue' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I even tried removing every trace of any AWS Posh module from my system and starting from scratch. Same result.
Also, doing Install-AWSToolsModule first without the -CleanUp
parameter, and then doing Update-AWSToolsModule
has the same result - the current versions are removed.
Guessing this might be a bug with comparing versions, or the current version (which is likely stored...somewhere) is wrong?
PowerShell 5 output for comparison:
PS ❯ Install-AWSToolsModule AWS.Tools.SQS -Force -SkipUpdate -SkipPublisherCheck -CleanUp
Package source with Name: AWSToolsTemp added successfully.
Installing module AWS.Tools.SQS version 4.1.38.0
Package source with Name: AWSToolsTemp removed successfully.
Logs
N/A - See output above.
Environment
- Build Version: AWS.Tools.Installer v1.0.2.4
- OS Info: Windows 10 Pro, v20H2
- Build Environment: Windows Terminal Preview - version 1.13.10395.0 - PowerShell v7.2.1
- Targeted .NET Platform: N/A
Resolution
- 👋 I can/would-like-to implement a fix for this problem myself
This is a 🐛 bug-report