From ee2c1c43cdad8a4848b6046ec24e1ecdf6b830d9 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Tue, 14 Nov 2023 13:05:01 +0000 Subject: [PATCH] Fix quiet mode for configure commands * The 'configure-commands' checks if the subcommand (eg `setup`/`login`) exists within the `bin/configure-commands` directory, and sets the remaining args (`${@:2}` rather than `${@:3}`) to be passed to the script. This means `-q` is passed through, even though it was previously unset. * This adds in the same code to the confgure commands section to ensure it's removed --- bin/dalmatian | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/dalmatian b/bin/dalmatian index fa13c2a..706b701 100755 --- a/bin/dalmatian +++ b/bin/dalmatian @@ -180,6 +180,16 @@ then if [[ -f "$APP_ROOT/bin/configure-commands/$SUBCOMMAND" ]] then COMMAND_ARGS=( "${@:2}" ) + QUIET_MODE=0 + for i in "${!COMMAND_ARGS[@]}" + do + if [ "${COMMAND_ARGS[i]}" == "-q" ] + then + QUIET_MODE=1 + unset "COMMAND_ARGS[i]" + fi + done + export QUIET_MODE "$APP_ROOT/bin/configure-commands/$SUBCOMMAND" "${COMMAND_ARGS[@]}" exit 0 fi