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

Create ~/.zshenv if SHELL=zsh #28

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Create ~/.zshenv if SHELL=zsh #28

merged 1 commit into from
Aug 12, 2022

Conversation

LPGhatguy
Copy link
Owner

Fixes #23.

This one is a bit tricky to test. I don't have a macOS machine, so I can't test it myself. Any help validating this change would be hugely appreciated!

To test:

  • Delete or rename your .zshenv file, as well as any other files Aftman detects (.profile, .bashrc, etc)
  • Run aftman self-install with Aftman from this branch in a zsh shell
  • Ensure that ~/.zshenv exists

@LPGhatguy LPGhatguy merged commit 20aad7c into main Aug 12, 2022
@LPGhatguy LPGhatguy deleted the zsh-make-zshenv branch August 12, 2022 00:57
@konstantinepapakonstantinou

This works on my machine. For what it's worth, I would add onto the install documentation to let people know they need to run the Aftman setup with sudo. Otherwise, Aftman is unable to actually change your .zshenv- at least, this was the case for me.

@LPGhatguy
Copy link
Owner Author

Thanks for testing this!

I don't think users should need to run aftman self-install with sudo. That's strange. Is it normal for .zshenv to be owned by root or some other user?

@konstantinepapakonstantinou

I am not sure what would specifically be causing the issue. The environment files are owned by me as the user and I have r/w access. It could have something to do with macOS itself- on a number of occasions, I have found myself needing to run things like npm or cargo with sudo. Maybe it's just an os-level quirk.

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.

Aftman does not install correctly if ~/.zshenv file does not exist (MacOS).
2 participants