juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Path Modification Issues

Open TommyCox opened this issue 1 year ago • 2 comments

Modify path adds a large non-portable chunk of code to my version controlled .bashrc that is shared across systems. This chunk isn't portable because the home path sometimes differs.

By comparison, rustup only adds one line: . "$HOME/.cargo/env" which sources a script nearly equivalent to the managed block juliaup injects into .bashrc.

Is there an intentional reason for this difference? If not, is it reasonable to change to a similar style of path modification?

tl;dr:

  1. juliaup added 15 lines to my .bashrc that could be sourced from a separate script.
  2. '/home/username/.juliaup/bin' seems less portable than '$HOME/.juliaup/bin'. Each one of these could be improved, making my dotfiles happier.

TommyCox avatar Jan 19 '24 21:01 TommyCox

That does seem like a nicer way to handle that!

davidanthoff avatar Jan 20 '24 18:01 davidanthoff

I like it.

Is "$HOME/.cargo/env then "generic" and works in "all" shells (whatever that means), or does is its content also "non-portable" and assumes a specific shell (bash vs zsh vs tcsh vs fish vs ...)

In other systems I know doing this, there are typically multiple files, say env.sh (for anything bourne shell compatible, assuming one can write the code portable), env.csh, env.fish, ...

fingolfin avatar Jan 26 '24 07:01 fingolfin