mkevenaar / chocolatey-packages

My chocolatey packages
https://mkevenaar.github.io/chocolatey-packages/
Apache License 2.0
42 stars 70 forks source link

Windows Terminal for Windows 11 #180

Closed rgl closed 1 year ago

rgl commented 1 year ago

Expected Behavior

I expected to install Windows Terminal for Windows 11.

The Windows Terminal versioning is too awkward and I'm not sure how this package should handle it (I've open an upstream issue at https://github.com/microsoft/terminal/issues/14980).

The current Windows Terminal repository makes a release at:

https://github.com/microsoft/terminal/releases/tag/v1.16.10261.0

BUT that release page actually has another version... 1.16.10262.0 which must be used in Windows 11.

Current Behavior

It fails to install with:

    microsoft-windows-terminal
    By upgrading, you accept licenses for the packages.
    microsoft-windows-terminal|1.15.3465.0|1.16.10261.0|false

    microsoft-windows-terminal v1.16.10261.0 [Approved]
    microsoft-windows-terminal package files upgrade completed. Performing other installation steps.
    WARNING: The installed 1.16.10261.0 version is newer than this package version, it may have autoupdated on your current OS...
    ERROR: Add-AppxProvisionedPackage failed. Error code = 0xc1570118
    The upgrade of microsoft-windows-terminal was NOT successful.
    Error while running 'C:\ProgramData\chocolatey\lib\microsoft-windows-terminal\tools\chocolateyInstall.ps1'.
     See log for details.

    Chocolatey upgraded 0/1 packages. 1 packages failed.
     See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Possible Solution

When running in Windows 11, install 1.16.10262.0 instead of 1.16.10261.0.

rgl commented 1 year ago

This is working since Windows Terminal 1.17, which uses the same version in Windows 10 and in Windows 11.

FWIW, that version also introduced another dependency, Microsoft.UI.Xaml (which I now manually install it at https://github.com/rgl/my-windows-ansible-playbooks/commit/9008540590bb939f7e5b914ea5765c02fa5dee5b too).