Skip to content

Commit

Permalink
Check existence of the executable file at MCFLY_PATH
Browse files Browse the repository at this point in the history
This is to avoid later error messages in the case MCFLY_PATH contained
an invalid/outdated path before the initialization by mcfly.bash.
  • Loading branch information
akinomyoga committed Jul 17, 2024
1 parent 568b286 commit df3e63d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mcfly.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function mcfly_initialize {

# Find the binary
MCFLY_PATH=${MCFLY_PATH:-$(builtin type -P mcfly)}
if [ -z "$MCFLY_PATH" ]; then
if [ ! -x "$MCFLY_PATH" ]; then
echo "Cannot find the mcfly binary, please make sure that mcfly is in your path before sourcing mcfly.bash."
return 1
fi
Expand Down

0 comments on commit df3e63d

Please sign in to comment.