From 5fb247c6ae0dead23984f39a9960eba6c7c35be2 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Sat, 16 Sep 2023 20:51:29 -0700 Subject: [PATCH] fix: Extension command plugins work without `bin/` directory --- bin/asdf | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/asdf b/bin/asdf index 633d1bc6b..2507f58fe 100755 --- a/bin/asdf +++ b/bin/asdf @@ -48,15 +48,13 @@ find_asdf_cmd() { find_plugin_cmd() { local ASDF_CMD_FILE args_offset - if [ -d "$(get_plugin_path "$1")/bin" ]; then - local result= - result="$(find_cmd "$(get_plugin_path "$1")/lib/commands" "${@:2}")" - ASDF_CMD_FILE=${result% *} - args_offset=${result##* } - if [ -n "$ASDF_CMD_FILE" ]; then - args_offset=$((args_offset + 1)) # since the first argument is the plugin name - printf "%s %s\n" "$ASDF_CMD_FILE" "$args_offset" - fi + local result= + result="$(find_cmd "$(get_plugin_path "$1")/lib/commands" "${@:2}")" + ASDF_CMD_FILE=${result% *} + args_offset=${result##* } + if [ -n "$ASDF_CMD_FILE" ]; then + args_offset=$((args_offset + 1)) # since the first argument is the plugin name + printf "%s %s\n" "$ASDF_CMD_FILE" "$args_offset" fi }