Skip to content

Commit

Permalink
fix: Only run virtualenvwrapper and ruby if they exist
Browse files Browse the repository at this point in the history
  • Loading branch information
vicnett committed Nov 14, 2024
1 parent f732f3a commit 7394248
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions zsh/zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

# Ruby gems
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"
if [[ -x $(command -v ruby) ]]; then
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"
fi
4 changes: 3 additions & 1 deletion zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ zinit snippet OMZL::key-bindings.zsh
bindkey '^H' backward-kill-word

# Load virtualenvwrapper
source /usr/bin/virtualenvwrapper.sh
if [[ -x /usr/bin/virtualenvwrapper.sh ]]; then
source /usr/bin/virtualenvwrapper.sh
fi

# Don't beep at me, bro!
setopt nobeep
Expand Down

0 comments on commit 7394248

Please sign in to comment.