Remove redundant check for GOENV_ROOT

pull/1515/head
David Farrell 2020-03-10 02:07:32 -07:00
parent 8c5581a52b
commit 1390409e55
No known key found for this signature in database
GPG Key ID: 1CCA28D0E300B56F
1 changed files with 3 additions and 3 deletions

View File

@ -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