New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for upgrading the CommandNotFound module #32766
Conversation
Looking through #30818, looks like we still need the ARM64 check due to...
Also need to look into...
... to see if the updated Microsoft.WinGet.Client module works in those cases. |
For the 7.4 installer for arm64, I wonder if we can just have it open "ms-windows-store://pdp/?ProductId=9mz1snwt0n5d" which would bring it right to the store installer. The PowerShell module will work in MSIX Store Installer due to the changes made in the 1.8 release that fixed the COM crashing. |
…t in EnableModule.ps1
@jaimecbernardo Added in the UpgradeModule.ps1 script and made it a part of Product.wxs. Pulling you in to figure out the installer bits 😊 |
I've added a couple of commits to have this run CI and be able to build well:
|
Thanks for the contribution and the changes 😄 |
Add-Content -Path $PROFILE -Value "`r`nImport-Module `"$scriptPath\WinGetCommandNotFound.psd1`"" | ||
Add-Content -Path $PROFILE -Value "#34de4b3d-13a8-4540-b76d-b9e8d3851756" | ||
Add-Content -Path $PROFILE -Value "`r`n#f45873b3-b655-43a6-b217-97c00aa0db58 PowerToys CommandNotFound module" | ||
Add-Content -Path $PROFILE -Value "`r`nImport-Module -Name Microsoft.WinGet.CommandNotFound`"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlos-zamora , have you tested this? (when the module is not installed and you install from scratch?)
The upgradeModule.ps1 seems to be running from the installer but not doing anything at first look. |
Ah yes it should be Update-Module instead
Jeremy Sinclair
Windows Development MVP
Avalonia MVP
[signatureImage]
[signatureImage]
…________________________________
|
Current status: Figuring out why the script seems to do nothing when running from the installer. |
Hmmmm a good thing to try is commenting out the starting portions of the script that run |
Figured it out, we were not passing the install folder as an argument to the custom action 😅 . |
No, actually. The module source code is moving into its own repo. From there, it'll be built/signed, then published to PSGallery. |
So, how will the module get to be installed from PSGallery? I think that's still missing from this PR, if I'm interpreting it correctly. |
Oops! Good catch! Updated! |
This comment has been minimized.
This comment has been minimized.
We're going for building the release candidate later today. Were these changes intended for this release? |
Yes! Final changes were made to the CommandNotFound module in the other repo and the pipeline successfully ran and output the signed module. I'm uploading it to the PSGallery today. Reviews would be appreciated to get this into the release 😊. Sorry it's coming in so close to the deadline! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me.
I tested upgrade scenario, clean install and uninstall on win11 on x64. Also, tested on Win10 Arm64 device. Everything works as expected
Summary of the Pull Request
f45873b3-b655-43a6-b217-97c00aa0db58
is now used in the PowerShell profile comment to denote that the module was installed/enabled34de4b3d-13a8-4540-b76d-b9e8d3851756
(the old one) is used to detect that an upgrade is available (and we upgrade to the one above appropriately)Related Issues
#30818
PR Checklist
Validation Steps Performed
Based on some work by @snickler