PowerShell / PowerShell/Win32-OpenSSH

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

Open
#2,208 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0 - Backlog Area-Install Issue-Enhancement
Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

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 https://github.com/PowerShell/openssh-portable/pull/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 d’utilisation de cette application vous est octroyée par son propriétaire.
Microsoft n’est pas responsable des paquets tiers et n’accorde 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 l’installation a été vérifié avec succès
Démarrage du package d’installation... 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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the MSI installation output and the winget installation path described in the issue. The work is done when installation reports the binary location and tells users to restart their shell so the updated PATH is available, with those messages passed through by winget.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.