helpers: force sourcing getopts before the other helpers to prevent stupid issues (in particular when renaming phpversion to php_version in helpers2.1)

This commit is contained in:
Alexandre Aubin 2024-07-20 22:47:44 +02:00
parent 7ee1734265
commit 3d53cf0467

View file

@ -13,6 +13,7 @@ YNH_HELPERS_DIR="$SCRIPT_DIR/helpers.v${YNH_HELPERS_VERSION}.d"
case "$YNH_HELPERS_VERSION" in
"1" | "2" | "2.1")
readarray -t HELPERS < <(find -L "$YNH_HELPERS_DIR" -mindepth 1 -maxdepth 1 -type f)
source $YNH_HELPERS_VERSION/getopts
for helper in "${HELPERS[@]}"; do
[ -r "$helper" ] && source "$helper"
done