Skip to content

Commit

Permalink
Fix quiet mode for configure commands
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Stretch96 committed Nov 14, 2023
1 parent 02d6769 commit ee2c1c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/dalmatian
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee2c1c4

Please sign in to comment.