Skip to content

Commit

Permalink
setup-util: prior workaround still not suppressing stdout output, try…
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Jan 22, 2025
1 parent 8f8145b commit 08c4e30
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions commands/setup-util
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,6 @@ function setup_util() (
# Process

# helpers
function echo_fallback {
local installer="$1"
echo-style --notice="[$option_name] via [$invocation] was unable to be installed by your system's existing package systems, we will now attempt to install it via by installing [$installer]" # handled by the eval_capture later
}
function get_path_from_filename {
local filename="$1"
# only place in appimage_home if it keeps the appimage extension
Expand Down Expand Up @@ -1091,7 +1087,7 @@ function setup_util() (
if ! is-manjaro; then
return 200 # ECUSTOM 200 Not applicable for this package system
fi
echo_fallback 'Pamac'
log_fallback 'Pamac'
setup-util-pamac --quiet="$option_quiet"
do_pamac "$@"
}
Expand Down Expand Up @@ -1675,7 +1671,7 @@ function setup_util() (
done
}
function do_flatpak_fallback {
echo_fallback 'Flatpak'
log_fallback 'Flatpak'
setup-util-flatpak --quiet="$option_quiet"
do_flatpak "$@"
}
Expand Down Expand Up @@ -1782,7 +1778,7 @@ function setup_util() (
done
}
function do_go_fallback {
echo_fallback 'Go'
log_fallback 'Go'
setup-util-go --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_go "$@"
Expand Down Expand Up @@ -1927,7 +1923,7 @@ function setup_util() (
if ! is-mac; then
return 200 # ECUSTOM 200 Not applicable for this package system
fi
echo_fallback 'Homebrew'
log_fallback 'Homebrew'
setup-util-brew --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_brew "$@"
Expand Down Expand Up @@ -2012,7 +2008,7 @@ function setup_util() (
if ! is-mac; then
return 200 # ECUSTOM 200 Not applicable for this package system
fi
echo_fallback 'Homebrew Cask'
log_fallback 'Homebrew Cask'
setup-util-brew --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_cask "$@"
Expand Down Expand Up @@ -2126,7 +2122,7 @@ function setup_util() (
if ! is-mac; then
return 200 # ECUSTOM 200 Not applicable for this package system
fi
echo_fallback 'mas'
log_fallback 'mas'
setup-util-mas --quiet="$option_quiet"
do_mas "$@"
}
Expand Down Expand Up @@ -2279,7 +2275,7 @@ function setup_util() (
nvm-env -- npm "${args[@]}" "${packages[@]}"
}
function do_npm_fallback {
echo_fallback 'Node.js & NPM'
log_fallback 'Node.js & NPM'
setup-util-node --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_npm "$@"
Expand Down Expand Up @@ -2368,7 +2364,7 @@ function setup_util() (
"${args[@]}" "${packages[@]}"
}
function do_pip_fallback {
echo_fallback 'Python & PIP'
log_fallback 'Python & PIP'
setup-util-python --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_pip "$@"
Expand Down Expand Up @@ -2442,7 +2438,7 @@ function setup_util() (
if ! __pip_helper --version &>/dev/null; then
setup-python
fi
echo_fallback 'Python & PIPX'
log_fallback 'Python & PIPX'
setup-util-pipx --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_pipx "$@"
Expand Down Expand Up @@ -2850,7 +2846,7 @@ function setup_util() (
done
}
function do_gem_fallback {
echo_fallback 'Ruby & Gem'
log_fallback 'Ruby & Gem'
setup-util-ruby --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_gem "$@"
Expand Down Expand Up @@ -2930,7 +2926,7 @@ function setup_util() (
done
}
function do_cargo_fallback {
echo_fallback 'Rust & Cargo'
log_fallback 'Rust & Cargo'
setup-util-rust --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_cargo "$@"
Expand Down Expand Up @@ -2993,7 +2989,7 @@ function setup_util() (

}
function do_snap_fallback {
echo_fallback 'Snap'
log_fallback 'Snap'
setup-util-snap --quiet="$option_quiet"
do_snap "$@"
}
Expand Down Expand Up @@ -3136,7 +3132,7 @@ function setup_util() (
return "$result"
}
function do_tea_fallback {
echo_fallback 'Tea'
log_fallback 'Tea'
setup-util-tea --quiet="$option_quiet"
source "$DOROTHY/sources/environment.sh"
do_tea "$@"
Expand Down Expand Up @@ -3762,6 +3758,10 @@ function setup_util() (
action_current='installing'
action_past='installed'
fi
function log_fallback {
local installer="$1"
echo-style --notice="[$option_name] via [$invocation] was unable to be installed by your system's existing package systems, we will now attempt to install it via by installing [$installer]" >"$terminal_device_file"
}
function log_pending {
local suffix='' method="${1-}"
if [[ -n $method ]]; then
Expand Down Expand Up @@ -3805,7 +3805,7 @@ function setup_util() (
if [[ $use_alt_screen_buffer == 'yes' ]]; then
__print_string "$alternative_screen_buffer" >"$terminal_device_file"
log_pending "$method"
eval_capture --statusvar=run_status --outputvar=run_output --outputpipe="$terminal_device_file" -- "$fn" >"$$terminal_device_file"
eval_capture --statusvar=run_status --outputvar=run_output --outputpipe="$terminal_device_file" -- "$fn"
__print_string "$default_screen_buffer" >"$terminal_device_file"
else
eval_capture --statusvar=run_status -- "$fn"
Expand Down

0 comments on commit 08c4e30

Please sign in to comment.