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: Use %LOCALAPPDATA%/zigup as the default install directory. #118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jhark
Copy link

@jhark jhark commented Apr 9, 2024

The previous behaviour was to use the zigup executable's own directory.

The previous behaviour would result in both a zig directory, and a zig.exe file in the user's PATH. The directory would prevent the linked zig executable created by zigup from being found in PATH when running under MSYS (e.g. trying to use zigup from within the bash install that comes with git for windows). Using %LOCALAPPDATA% avoids this issue and better matches the behaviour on other platforms.

Tested on Windows and Linux (under WSL) with LOCALAPPDATA/HOME:

  • Unset.
  • Set to a bad path.
  • Set normally.

Observed expected error output/success.

jhark added 2 commits April 9, 2024 20:38
Note that the previous behaviour of using the zigup executable's own directory would result in both a `zig` directory, and a `zig.exe` file in the user's PATH. The directory would prevent the executable from being found under MSYS (e.g. trying to use zigup from within the bash install that comes with git).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant