Skip to content
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

Winget (and MSI) installer updates PATH but does not tell user to restart their shell #2208

Open
phil-blain opened this issue Feb 20, 2024 · 0 comments

Comments

@phil-blain
Copy link

Summary of the new feature / enhancement

As a user, I like that winget install Microsoft.OpenSSH.Beta updates PATH to include the just-installed binaries (which is done since PowerShell/openssh-portable#622), but it would be even better if the installation procedure showed a message saying one must restart their shell/terminal for the new binaries to be available.

Right now this is the output I get (pardon my French):

PS C:\Users\me\Downloads> winget install Microsoft.OpenSSH.Beta
Trouvé OpenSSH Beta [Microsoft.OpenSSH.Beta] Version 9.5.0.0
La licence dutilisation de cette application vous est octroyée par son propriétaire.
Microsoft nest pas responsable des paquets tiers et naccorde pas de licences à ceux-ci.
Téléchargement en cours https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.5.0.0p1-Beta/OpenSSH-Win64-v9.5.0.0.msi
  ██████████████████████████████  5.47 MB / 5.47 MB
Le code de hachage de linstallation a été vérifié avec succès
Démarrage du package dinstallation... Merci de patienter.
Installé correctement
PS C:\Users\me\Downloads> gcm -all ssh | format-table -autosize

CommandType Name    Version Source
----------- ----    ------- ------
Application ssh.exe 8.9.1.0 C:\Users\me\AppData\Local\Programs\OpenSSH-Win64\ssh.exe
Application ssh.exe 8.1.0.1 C:\Windows\System32\OpenSSH\ssh.exe

i.e. PATH is not updated in the current shell so it only finds my previous (user-level) install and the system one, not the newly installed 9.5 version. It showed up correctly once I opened a new tab in Windows Terminal.

Proposed technical implementation details (optional)

The MSI installer should, in my opinion:

  1. Tell the user where it installed the binaries
  2. Tell the user to restart their shell / terminal program for the PATH modification to take effect
  3. The winget install should pass through those messages.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants