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 install podman removes winget from PATH #12873

Closed
scato opened this issue Jan 14, 2022 · 6 comments
Closed

winget install podman removes winget from PATH #12873

scato opened this issue Jan 14, 2022 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@scato
Copy link

scato commented Jan 14, 2022

/kind bug

Description

I just installed podman on Windows 10 using the following command:

winget install podman

After that, I started getting the following error:

'winget' is not recognized as an internal or external command,
operable program or batch file.

I managed to get winget back into my PATH again, but when I uninstalled podman and installed it again later, I got the exact same error. What's also insteresting is that when I went to add the path environment variable again (which is called "Path" in de "Edit environment variable" window) it specifically contained "%PATH%" and "C:\Program Files (x86)\RedHat\Podman". This would suggest that installing podman overwrites all other path entries, which is not desired behavior IMHO.

Steps to reproduce the issue:

  1. open cmd on Windows 10

  2. run winget install podman

  3. close cmd and open a new one

  4. run winget

Describe the results you received:

'winget' is not recognized as an internal or external command,
operable program or batch file.

Describe the results you expected:

Windows Package Manager v1.1.13405
Copyright (c) Microsoft Corporation. Alle rechten voorbehouden.

Met het opdrachtregelprogramma WinGet kunnen toepassingen en andere pakketten worden geïnstalleerd vanaf de opdrachtregel.

gebruik: winget [<opdracht>] [<opties>]

De volgende opdrachten zijn beschikbaar:
  install    Het opgegeven pakket installeren
  show       Toont informatie over een pakket
  source     Bronnen van pakketten beheren
  search     Basisgegevens van pakketten zoeken en weergeven
  list       Geïnstalleerde pakketten weergeven
  upgrade    Hiermee wordt het opgegeven pakket bijgewerkt
  uninstall  Installatie van het opgegeven pakket ongedaan maken
  hash       Helper voor het hashen van installatiebestanden
  validate   Valideert een manifestbestand
  settings   Instellingen openen of beheerdersinstellingen instellen
  features   Hiermee wordt de status van experimentele functies weergegeven
  export     Exporteert een lijst met geïnstalleerde pakketten
  import     Installeert alle pakketten in een bestand

Geef het Help-argument door voor meer informatie over een bepaalde opdracht. [-?]

De volgende opties zijn beschikbaar:
  -v,--version  De versie van dit programma weergeven
  --info        Algemene informatie van dit programma weergeven

Meer hulp vindt u op: https://aka.ms/winget-command-help

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v3.4.4/libpod/_ping": dial unix ///run/podman/podman.sock: connect: An invalid argument was supplied.

Output of podman info --debug:

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v3.4.4/libpod/_ping": dial unix ///run/podman/podman.sock: connect: An invalid argument was supplied.

Package info (e.g. output of rpm -q podman or apt list podman):

Podman                                  RedHat.Podman                           3.4.4                            winget

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes and No respectively

Additional environment details (AWS, VirtualBox, physical, etc.):

Physical Window 10 HP laptop

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 14, 2022
@baude
Copy link
Member

baude commented Jan 16, 2022

@jwhonce i believe we fiddle with the path after install of podman on windows right?

@scato
Copy link
Author

scato commented Jan 16, 2022

I think

if typ == registry.EXPAND_SZ {
is where this happens.

@scato
Copy link
Author

scato commented Jan 16, 2022

The weird thing is that my path still includes %PATH% afterwards, but not the rest.

@Luap99
Copy link
Member

Luap99 commented Jan 17, 2022

@scato Did you build and install podman from the main branch? If you used 3.4 it is still broken and the added winpath helper in #12597 is supped to fix this for 4.0. @n1hility Can you confirm?

@n1hility
Copy link
Member

@Luap99 yes thats correct, #12597 should resolve this issue, and I can confirm that previous to that it would overwrite other path values.

@Luap99 Luap99 closed this as completed Jan 17, 2022
@scato
Copy link
Author

scato commented Jan 17, 2022

That's right, I installed 3.4.4 using winget.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

5 participants