File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -186,19 +186,19 @@ bye() {
186
186
187
187
testVersion () {
188
188
set +e
189
- EXECUTABLE_PATH=" $( command -v $PROJECT_NAME ) "
190
- if [ " $? " = " 1" ]; then
191
- # $PATH is intentionally a literal in this message.
192
- # shellcheck disable=SC2016
193
- echo " $PROJECT_NAME not found. You might want to add \" $EFFECTIVE_BINDIR \" to your " ' $PATH'
194
- else
189
+ if EXECUTABLE_PATH=" $( command -v $PROJECT_NAME ) " ; then
195
190
# Convert to resolved, absolute paths before comparison
196
191
EXECUTABLE_REALPATH=" $( cd -- " $( dirname -- " $EXECUTABLE_PATH " ) " && pwd -P) "
197
192
EFFECTIVE_BINDIR_REALPATH=" $( cd -- " $EFFECTIVE_BINDIR " && pwd -P) "
198
193
if [ " $EXECUTABLE_REALPATH " != " $EFFECTIVE_BINDIR_REALPATH " ]; then
194
+ # $PATH is intentionally a literal in this message.
199
195
# shellcheck disable=SC2016
200
196
echo " An existing $PROJECT_NAME was found at $EXECUTABLE_PATH . Please prepend \" $EFFECTIVE_BINDIR \" to your " ' $PATH' " or remove the existing one."
201
197
fi
198
+ else
199
+ # $PATH is intentionally a literal in this message.
200
+ # shellcheck disable=SC2016
201
+ echo " $PROJECT_NAME not found. You might want to add \" $EFFECTIVE_BINDIR \" to your " ' $PATH'
202
202
fi
203
203
204
204
set -e
You can’t perform that action at this time.
0 commit comments