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

Windows Installer breaks PATH variable #11416

Closed
max06 opened this issue Sep 2, 2021 · 14 comments · Fixed by #12511
Closed

Windows Installer breaks PATH variable #11416

max06 opened this issue Sep 2, 2021 · 14 comments · Fixed by #12511
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

@max06
Copy link

max06 commented Sep 2, 2021

Your Windows Installer is breaking the users environment by adding a single " at the end of the path-variable.

Can only be reverted via registry editor:
image

Windows UI for env vars doesn't show it anymore.

Also, as a side note: It doesn't clean up the env var when uninstalling.

@mheon mheon added the kind/bug Categorizes issue or PR as related to a bug. label Sep 3, 2021
@mheon
Copy link
Member

mheon commented Sep 3, 2021

@jwhonce PTAL

@jwhonce
Copy link
Member

jwhonce commented Sep 7, 2021

The clean up issue is being tracked here: #11089

We are waiting on PR to wixl to support clean up.

@baude @ashley-cui I seem to remember the quote issue being addressed or at least discussed before. Do you have any input?

@ndavids-msft
Copy link

One non-obvious symptom of this issue is that, after installing Podman, the CLI can only be called from the traditional Windows Command Prompt (CMD) and not from PowerShell. Apparently CMD will parse PATH with the invalid trailing quote, but PowerShell will not. So PowerShell users will just get the usual error message indicating a missing command:

podman: The term 'podman' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

CMD:
image

PowerShell:
image

Not that this changes anything about the underlying problem, but it might help to direct PowerShell users' searches to this issue where the fix is described.

@max06
Copy link
Author

max06 commented Sep 8, 2021

Just for completeness:
Besides Powershell not parsing it properly, windows itself has the same issue. The window where you can set profile environment variables lists the content in Path, but it stays empty as soon as you try to modify it.

To fix:
Run regedit with admin privileges, navigate to HKEY_CURRENT_USER -> Environment. You'll find Path on the right side, ready to be modified. Changes in there are reflected immediately.

@ndavids-msft
Copy link

So I found that you can actually edit it in the regular environment variables UI, you just need to use the "Edit text" option.

Steps

  1. Open the System Properties windows (sysdm.cpl)
  2. Under the Advanced tab click "Environment Variables..."
  3. Edit the Path variable in the User variables section (top section of the window)
  4. In the Edit dialog, click the "Edit text..." button
    image
  5. Remove the trailing quote, then "OK" through all the open dialogs
    image

@max06
Copy link
Author

max06 commented Sep 8, 2021

I should have confirmed that dialog box when I had the chance ... that's easier than using the registry 💯

@github-actions
Copy link

github-actions bot commented Oct 9, 2021

A friendly reminder that this issue had no activity for 30 days.

@max06
Copy link
Author

max06 commented Oct 9, 2021

The latest installer is still adding a single double-quote to the Path...

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Nov 9, 2021

Is this fixed in podman 3.4.1

@max06
Copy link
Author

max06 commented Nov 9, 2021

@rhatdan Sorry, I completely missed this...

Just tested: Removed all previous versions, made sure my env vars are clean. Still a lost double-quote after 3.4.1...

@rhatdan
Copy link
Member

rhatdan commented Nov 9, 2021

28 days ago, I nagged the PR to MSI, but still no movement that I can see.

@max06
Copy link
Author

max06 commented Nov 9, 2021

/shrug
Can I add some WD-40 somewhere?

@rhatdan
Copy link
Member

rhatdan commented Nov 9, 2021

Go add a further whine to #11089

n1hility added a commit to n1hility/podman that referenced this issue Dec 6, 2021
…ote is not escaped

Fixes containers#11416 [NO NEW TESTS NEEDED]

Signed-off-by: Jason Greene <[email protected]>
openshift-merge-robot added a commit that referenced this issue Dec 6, 2021
Fixes #11416 - Trailing quote on PATH added by Windows MSI
mheon pushed a commit to mheon/libpod that referenced this issue Dec 6, 2021
…ote is not escaped

Fixes containers#11416 [NO NEW TESTS NEEDED]

Signed-off-by: Jason Greene <[email protected]>
@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

Successfully merging a pull request may close this issue.

5 participants