From 61420ad90829b2c9bf1ca16681a2eb652adcc755 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Sun, 17 Sep 2023 04:50:47 -0700 Subject: [PATCH] fix: plugin extension commands to not require `bin/` directory (#1643) --- bin/asdf | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/asdf b/bin/asdf index 633d1bc6..2507f58f 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 }