From 42243711a018c4a6c6f223b6be892528f4901b47 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Mon, 8 Jul 2024 15:36:50 +0900 Subject: [PATCH] Check existence of the executable file at MCFLY_PATH This is to avoid later error messages in the case MCFLY_PATH contained an invalid/outdated path before the initialization by mcfly.bash. --- mcfly.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcfly.bash b/mcfly.bash index 55c7d2f..52d4936 100644 --- a/mcfly.bash +++ b/mcfly.bash @@ -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