Skip to content

Commit

Permalink
Improve logic to init flags
Browse files Browse the repository at this point in the history
  • Loading branch information
eliu committed Jan 22, 2024
1 parent 90aa768 commit a82d573
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions include/devbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ function has_command() {
require config logging
config::load_properties

QUIET_FLAG_Q=$(log::is_verbose_enabled || printf -- "-q")
QUIET_FLAG_S=$(log::is_verbose_enabled || printf -- "-s")
QUIET_STDOUT=$(log::is_verbose_enabled && echo "/dev/stdout" || echo "/dev/null")
QUIET_PULL=$(log::is_verbose_enabled || printf -- "--quiet-pull")
QUIET_STDOUT="/dev/stdout"
if ! log::is_verbose_enabled; then
QUIET_STDOUT="/dev/null"
QUIET_FLAG_Q="-q"
QUIET_FLAG_S="-s"
QUIET_PULL="--quiet-pull"
fi

0 comments on commit a82d573

Please sign in to comment.