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

No zprofile? #45

Closed
SturmB opened this issue Jun 9, 2020 · 3 comments
Closed

No zprofile? #45

SturmB opened this issue Jun 9, 2020 · 3 comments

Comments

@SturmB
Copy link

SturmB commented Jun 9, 2020

I have a situation where I'm also installing Ruby using geerlingguy's role. This places a shell script in /etc/profile.d/ called rubygems.sh. (There are several other *.sh files there, btw.)

Because zsh does not source /etc/profile (to the best of my knowledge), none of these scripts ever run. However, isn't zsh supposed to install /etc/zprofile? If so, this role does not do so. Thus, no scripts in /etc/profile.d/ are ever sourced and, therefore, Ruby and some gems I install using geerlingguy's role are not accessible.

Am I wrong about any of this? Or what sort of fix needs to happen here?

@popstas
Copy link
Contributor

popstas commented Jun 10, 2020

You are right, /etc/profile.d should be sourced to shell.

As temporary solution: you can add to ~/.zshrc.local (create it):

source /etc/profile.d/rubygems.sh

Or include all in /etc/profile:

source /etc/profile

I'm not sure that it not break anything, will try to use my terminal with source /etc/profile.

Thank you!

Please, give feedback, is it solved your situation?

@SturmB
Copy link
Author

SturmB commented Jun 12, 2020

I had added source /etc/profile.d/rubygems.sh to my ~/.zshrc.local file a few days ago and it appears to work.

Just now, I tried the second option and that, too, appears to work without issue. Perhaps this should somehow be added to this role? Perhaps included in .zshrc?

@popstas
Copy link
Contributor

popstas commented Jun 13, 2020

@SturmB , added variable zsh_load_etc_profile (default: yes) will load /etc/profile.d scripts, in ~/zshrc. Thank you!

loic-roux-404 pushed a commit to loic-roux-404/role-zsh that referenced this issue Nov 1, 2020
zsh_load_etc_profile (default: yes) will load /etc/profile.d scripts

Closes viasite-ansible#45
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

No branches or pull requests

2 participants