From 1390409e550f8ba98db5f0d1110452c3722a0262 Mon Sep 17 00:00:00 2001 From: David Farrell Date: Tue, 10 Mar 2020 02:07:32 -0700 Subject: [PATCH] Remove redundant check for GOENV_ROOT --- plugins/available/goenv.plugin.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/available/goenv.plugin.bash b/plugins/available/goenv.plugin.bash index 07e11f80..568e3e35 100644 --- a/plugins/available/goenv.plugin.bash +++ b/plugins/available/goenv.plugin.bash @@ -6,12 +6,12 @@ about-plugin 'Init goenv, if installed. Plays nicely with package managers' # NOTE: We don't export it yet, since we might still bail GOENV_ROOT="${GOENV_ROOT:-${HOME}/.goenv}" -# Look for goenv command, adding to path if needbe -if ! _command_exists goenv && [ -n "${GOENV_ROOT}" ] && [ -x "${GOENV_ROOT}/bin/goenv" ] ; then +# If goenv not on path, but in GOENV_ROOT, then add to path +if ! _command_exists goenv && [ -x "${GOENV_ROOT}/bin/goenv" ] ; then pathmunge "${GOENV_ROOT}/bin" fi -# If we found the command, we're good to go +# If goenv on path, we're good to go if _command_exists goenv ; then # Now its safe to export the value export GOENV_ROOT