Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Create ~/.zshenv if SHELL=zsh#28

Merged
LPGhatguy merged 1 commit into
mainfrom
zsh-make-zshenv
Aug 12, 2022
Merged

Create ~/.zshenv if SHELL=zsh#28
LPGhatguy merged 1 commit into
mainfrom
zsh-make-zshenv

Conversation

@LPGhatguy

Copy link
Copy Markdown
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
@kpapa05

kpapa05 commented Aug 17, 2022

Copy link
Copy Markdown

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
Copy Markdown
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?

@kpapa05

kpapa05 commented Aug 21, 2022

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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