nushell icon indicating copy to clipboard operation
nushell copied to clipboard

Windows Installer - Issues after automated upgrade from `0.104.0` to `0.105.1`

Open Kissaki opened this issue 6 months ago • 9 comments

Describe the bug

After installing Nushell v0.105.1 I do not see the application in Windows settings Apps, and winget gets (or can get) confused about whether it is installed or not.

I had "nu" listed in apps with version 0.104, and winget list listing both a 104 and 105 install.

After a cleanup via uninstall and winget uninstall --id Nushell.Nushell and some testing, winget list still showed it, no installed files where there, and winget uninstall did not work, even though earlier it did (presumably when the install was still there factually).

How to reproduce

Install via nu-0.105.1-x86_64-pc-windows-msvc.msi manually or via winget install --id Nushell.Nushell

Expected behavior

Windows Settings -> Apps shows the install

winget list shows the install (this seems to work)

winget uninstall removes the install, and afterwards winget list no longer lists it as installed.

Configuration

key value
version 0.105.1
major 0
minor 105
patch 1
branch
commit_hash 1fe62ee6132372453d6bfeb95978ee61a2b77f3b
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.85.1 (4eb161250 2025-03-15)
rust_channel 1.85.1-x86_64-pc-windows-msvc
cargo_version cargo 1.85.1 (d73d2caf9 2024-12-31)
build_time 2025-06-10 19:56:11 +00:00
build_rust_channel release
allocator standard
features default, sqlite, trash
installed_plugins

Kissaki avatar Jun 12 '25 06:06 Kissaki

I was apparently still using v104 and nu --version also showed v104 even with 105 installed (automatically, via winget upgrades, via Intune or however that works).

I don't know what was up with that. Did the installer not update the exe or path or Windows Terminal profile?

Kissaki avatar Jun 12 '25 06:06 Kissaki

Please uninstall all previously installed versions of Nushell and then try reinstalling it. After the packaging configuration was completely rewritten, the system may treat the old and new versions as two separate products, so it's not possible to upgrade directly from the old version to the new one.

hustcer avatar Jun 12 '25 11:06 hustcer

How am I supposed to uninstall what is not listed in apps nor uninstallable in winget nor running the installer offers the modify or uninstall options it does when it is already uninstalled?

I see Nushell 105 under apps now, I assume since I restarted the system.

Kissaki avatar Jun 12 '25 12:06 Kissaki

I see Nushell 105 under apps now, I assume since I restarted the system.

That means it works as expected. For the previous version I can do nothing. Maybe you can simply delete the folder

hustcer avatar Jun 12 '25 12:06 hustcer

Uninstalling the old one worked perfectly fine.

The new one installing but neither showing up as installed nor being actually run as nu.exe and in terminal, while winget listed is as installed was unexpected.

Kissaki avatar Jun 12 '25 12:06 Kissaki

I'm unable to reproduce this issue locally, and all tests are passing here: https://github.com/nushell/integrations/actions/runs/15600778298. Perhaps you could investigate and submit a PR with a fix?

hustcer avatar Jun 12 '25 13:06 hustcer

Presumably it's only an issue on the upgrade path from earlier versions, in this case specifically 0.104.0, not on fresh installs. In that state, uninstalls are not reflected correctly in install metadata anymore, at least until restart.

I noticed the installed app is named Nushell now, nu before.

My colleague also sees two installations in winget list after the upgrade install and nu --version shows 104.

Maybe an issue of mixed matching and not matching metadata/IDs between the installers.

Kissaki avatar Jun 12 '25 14:06 Kissaki

On this other PC I have 0.104.1 installed and winget declines to upgrade

winget upgrade Nushell.Nushell
No applicable upgrade found.
A newer package version is available in a configured source, but it does not apply to your system or requirements.

Kissaki avatar Jun 13 '25 16:06 Kissaki

0.104.1 is the first version after the WiX 6.0 refactor. If this version has upgrade issues, I will fix them, but I won’t handle upgrade problems from earlier versions(0.104.0 and before).

hustcer avatar Jun 14 '25 10:06 hustcer

I have created some PRs: https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+is%3Aopen+nushell try to fix this issue, however, I guess they will never be merged. Maybe we should build new MSI packages(with version like 0.105.1.1 ) here https://github.com/nushell/integrations/releases from the existing 0.105.1 binaries and publish the new version to the winget-pkgs repo?

hustcer avatar Jun 21 '25 12:06 hustcer

After 0.106 been published to winget repo the following should occur(please uninstall the previous version by winget uninstall nushell):

  1. --scope flag was supported for winget install
  2. When no nu is installed, winget install --id Nushell.Nushell --scope machine will install Nushell to C:\Program Files\nu.
  3. winget update --id Nushell.Nushell will upgrade Nushell to the latest version with machine scope.
  4. When no nu is installed, winget install --id Nushell.Nushell will install Nushell to %LOCALAPPDATA%\Programs\nu.
  5. Due to winget-cli issue #3011, winget update --id Nushell.Nushell will unexpectedly install the latest version to C:\Program Files\nu. The workaround is to run winget install --id Nushell.Nushell again to install the latest version for user scope.

hustcer avatar Jul 24 '25 00:07 hustcer

When I call winget install --id Nushell.Nushell --scope machine it downloads the 0.104.0 installer.

winget install --id Nushell.Nushell --scope machine
Found nu [Nushell.Nushell] Version 0.104.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/nushell/nushell/releases/download/0.104.0/nu-0.104.0-x86_64-pc-windows-msvc.msi
  ▊                               1024 KB / 35.2 MB

Kissaki avatar Jul 24 '25 16:07 Kissaki

Just wait after https://github.com/microsoft/winget-pkgs/pull/276704 been merged

hustcer avatar Jul 24 '25 16:07 hustcer

Just wait after microsoft/winget-pkgs#276704 been merged

It's merged, and everything work as expected: https://github.com/nushell/integrations/actions/runs/16535118533/job/46768045924#step:6:463

hustcer avatar Jul 26 '25 02:07 hustcer