added check to make sure ruby is installed before adding to $PATH.

This commit is contained in:
Gabe Venberg 2023-07-07 08:58:07 -05:00
parent 581b9d62f8
commit feccec18ad
2 changed files with 7 additions and 1 deletions

View file

@ -32,3 +32,8 @@ dotfiles
ctrl
sed
NGINX
timezones
Proxmox
Gabe
Venberg
Github

View file

@ -14,7 +14,7 @@
#set important shell variables
#fancy way of testing if a command exists
(($+command[ruby])) && export PATH="$PATH:$(ruby -e 'puts Gem.user_dir' 2> /dev/null)/bin"
ruby --version &>/dev/null && export PATH="$PATH:$(ruby -e 'puts Gem.user_dir' 2> /dev/null)/bin/"
#test that these nonstandard paths exist before adding to PATH.
testPath="$HOME/.local/bin"
[ -d "$testPath" ] && export PATH="$PATH:$testPath"
@ -34,6 +34,7 @@
#set ssh-agent to play nice with systemd.
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export TIMEFMT="%J %*U user %*S system %P cpu %*E total"
export PIPENV_VENV_IN_PROJECT=true
#prompt
autoload -U promptinit