From 79321ce217f98991d8c37d881592d07746b6834c Mon Sep 17 00:00:00 2001 From: ravenhall Date: Mon, 9 May 2016 17:56:45 -0500 Subject: [PATCH] Only pathmunge if plenv path exists, removed error message when plenv not found --- plugins/available/plenv.plugin.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/available/plenv.plugin.bash b/plugins/available/plenv.plugin.bash index a9193fdb..1cd8fa03 100644 --- a/plugins/available/plenv.plugin.bash +++ b/plugins/available/plenv.plugin.bash @@ -3,7 +3,12 @@ cite about-plugin about-plugin 'plenv plugin for Perl' -pathmunge "${HOME}/.plenv/bin" +if [[ -e "${HOME}/.plenv/bin" ]] ; then + + # load plenv bin dir into path if it exists + pathmunge "${HOME}/.plenv/bin" + +fi if [[ `which plenv` ]] ; then @@ -13,5 +18,4 @@ if [[ `which plenv` ]] ; then # Load the auto-completion script if it exists. [[ -e ~/.plenv/completions/plenv.bash ]] && source ~/.plenv/completions/plenv.bash -else echo "Unable to find plenv. See https://github.com/tokuhirom/plenv for installation" fi