From d312c1913bf9fccd00e2a1977b1c8c5ee3873ffd Mon Sep 17 00:00:00 2001 From: James Dixon Date: Sat, 30 Jan 2021 16:44:03 -0500 Subject: [PATCH] check if rbenv shim is already in path --- files/bash/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/bash/.bashrc b/files/bash/.bashrc index 0c657b1..85bb077 100644 --- a/files/bash/.bashrc +++ b/files/bash/.bashrc @@ -232,7 +232,7 @@ if command -v ruby > /dev/null && command -v gem > /dev/null; then # rbenv shim if [ -d "$HOME/.rbenv/bin" ]; then appendpath "$HOME/.rbenv/bin" - eval "$(rbenv init -)" + [[ ":$PATH:" != *":$HOME/.rbenv/shims:"* ]] && eval "$(rbenv init -)" fi fi