juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

PATH propagation for zhs

Open davidanthoff opened this issue 3 years ago • 4 comments

hmm... So I'm launching pwsh via /bin/zsh --login -t -c pwsh (also how I define my Julia, Wolfram, etc profiles). I used to get the path via the path.d mechanism, but I'm not getting any path change from this?

Adding source ~/.profile to .zprofile brought things in.

Originally posted by @deoradh in https://github.com/JuliaLang/juliaup/issues/174#issuecomment-1013639350

davidanthoff avatar Jan 15 '22 18:01 davidanthoff

Was your .zshrc file modified? That is the one change I'm making for zsh at the moment. I would have thought that the command /bin/zsh --login -t -c pwsh would run that? But maybe not? My understanding was that .zshrc always run and that that would be the one place where we need to make modifications on MacOS? @StefanKarpinski any ideas?

davidanthoff avatar Jan 15 '22 19:01 davidanthoff

it was:

eval "$(starship init zsh)"

test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# >>> juliaup initialize >>>

# !! Contents within this block are managed by juliaup !!

path=('/Users/kfarmer/.juliaup/bin' $path)
export PATH

# <<< juliaup initialize <<<

deoradh avatar Jan 15 '22 19:01 deoradh

So that suggests that for some reason .zshrc is not sourced when you run your command, right? I guess the question now is why is that :)

davidanthoff avatar Jan 15 '22 19:01 davidanthoff

Ok, so I don't really know what to do about this :) I think what is happening is that

  • we correctly modify .zshrc
  • for some reason running /bin/zsh --login -t -c pwsh does not run .zshrc.

It is not clear to me whether it should do step 2 or not, or what the correct way out of this is. Maybe @StefanKarpinski has an idea?

davidanthoff avatar Jan 20 '22 23:01 davidanthoff

Bump, does anyone have any more insights on this? It seems to me that this is not a broad problem, otherwise we would probably have heard more bug reports about this? So, I'm tempted to close this issue, unless someone chimes in with more info what we need to do here.

davidanthoff avatar Dec 13 '22 22:12 davidanthoff

I don't recall the nature of how I worked around it. I suspect manual surgery but nothing scripted.

deoradh avatar Dec 13 '22 23:12 deoradh

I'm going to close this for now. We must have very many zhs users, namely everyone on Mac, and given that none of them had this problem, I'm just hoping that this was a machine specific issue :)

davidanthoff avatar Dec 14 '22 22:12 davidanthoff