You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once again copying over from a conversation on Slack with David, I'm sharing my proposal on how juliaup could approach making julia/juliaup availible to run at the shell, while making as few assumptions about the user's system as reasonably possible.
Look on current $PATH and the default/fallback juliaup install dir for an existing install of juliaup
Look for the standard user executable folder(s)
Identify the login shell using the first successful rule:
a. Read $SHELL
b. Check getent passwd ${USER:-$(whoami)} (linux)
c. Check dscl . -read /Users/${USER:-(whoami)} UserShell (darwin)
d. Look for known shell config files (also needed for step 7), taking into account system configuration ($ZDOTDIR affects ZSH, $XDG_CONFIG_HOME affects Fish, etc.)
If a standard executable folder already exists, or is placed on $PATH by a login shell, create or link the juliaup binary there. Stop here, further steps are not needed.
If a shell RC file exists for the user, attempt to edit $PATH in it.
a. If it cannot be modified, inform the user and ask if they'd like to:
i. Using sudo, make the file read-write for the current user, and modify normally
ii. Abort and make the $PATH change manually themselves
iii. Using sudo, forcibly modify the shell file
If a shell RC file does not exist, create it.
If other shell files were detected, optionally or eagerly modify them too
Run a login shell to confirm that juliaup is indeed added to $PATH
I'll note that step No.4 on Linux is covered in more detail, with a few extra comments, in #844. However, that issue got sidetracked talking about the impact of XDG and Linux norms on Julia again, which is a different problem from being able to run Julia in the first place.
The text was updated successfully, but these errors were encountered:
Once again copying over from a conversation on Slack with David, I'm sharing my proposal on how juliaup could approach making
julia
/juliaup
availible to run at the shell, while making as few assumptions about the user's system as reasonably possible.$PATH
and the default/fallback juliaup install dir for an existing install of juliaupa. Read
$SHELL
b. Check
getent passwd ${USER:-$(whoami)}
(linux)c. Check
dscl . -read /Users/${USER:-(whoami)} UserShell
(darwin)d. Look for known shell config files (also needed for step 7), taking into account system configuration (
$ZDOTDIR
affects ZSH,$XDG_CONFIG_HOME
affects Fish, etc.)$PATH
by a login shell, create or link thejuliaup
binary there. Stop here, further steps are not needed.a. If it cannot be modified, inform the user and ask if they'd like to:
i. Using sudo, make the file read-write for the current user, and modify normally
ii. Abort and make the
$PATH
change manually themselvesiii. Using sudo, forcibly modify the shell file
juliaup
is indeed added to$PATH
I'll note that step No.4 on Linux is covered in more detail, with a few extra comments, in #844. However, that issue got sidetracked talking about the impact of XDG and Linux norms on Julia again, which is a different problem from being able to run Julia in the first place.
The text was updated successfully, but these errors were encountered: