install: fix "stack" installation when .local/bin is not in PATH
This commit is contained in:
parent
26624ef94c
commit
afd7cae169
@ -949,6 +949,17 @@ fi
|
|||||||
|
|
||||||
echo "hledger-install.sh $HLEDGER_INSTALL_VERSION $(date)"
|
echo "hledger-install.sh $HLEDGER_INSTALL_VERSION $(date)"
|
||||||
|
|
||||||
|
# ensure ~/.local/bin/ in PATH
|
||||||
|
# TODO should check ~/.cabal/bin if using cabal
|
||||||
|
if ! on_path "$HOME_LOCAL_BIN" ; then
|
||||||
|
echo "WARNING: this script installs hledger (and perhaps stack) in '$HOME_LOCAL_BIN'"
|
||||||
|
echo " but this directory is not in your PATH. Adding it temporarily. To run"
|
||||||
|
echo " these things easily, please add it to PATH in your shell profile."
|
||||||
|
echo " Eg, bash users: "
|
||||||
|
echo " echo \"export PATH=\$PATH:~/.local/bin\" >> ~/.bashrc && source ~/.bashrc"
|
||||||
|
export PATH=$HOME_LOCAL_BIN:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
# show system info
|
# show system info
|
||||||
echo
|
echo
|
||||||
echo "System info:"
|
echo "System info:"
|
||||||
@ -990,17 +1001,6 @@ else
|
|||||||
ensure_stack
|
ensure_stack
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ensure ~/.local/bin/ in PATH
|
|
||||||
# TODO should check ~/.cabal/bin if using cabal
|
|
||||||
if ! on_path "$HOME_LOCAL_BIN" ; then
|
|
||||||
echo "WARNING: this script installs hledger (and perhaps stack) in '$HOME_LOCAL_BIN'"
|
|
||||||
echo " but this directory is not in your PATH. Adding it temporarily. To run"
|
|
||||||
echo " these things easily, please add it to PATH in your shell profile."
|
|
||||||
echo " Eg, bash users: "
|
|
||||||
echo " echo \"export PATH=\$PATH:~/.local/bin\" >> ~/.bashrc && source ~/.bashrc"
|
|
||||||
export PATH=$HOME_LOCAL_BIN:$PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# try installing each package that needs installing, in turn
|
# try installing each package that needs installing, in turn
|
||||||
echo
|
echo
|
||||||
echo Installing hledger packages:
|
echo Installing hledger packages:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user