Handle non-TTY output; simplify verbosity check

Detect non-TTY stderr in msg_info() and print a static progress indicator instead of launching the background spinner (which is unreliable when output is piped). Remove the non-TTY check from is_verbose_mode() and add comments clarifying that non-TTY behavior is handled in msg_info(). Apply the same verbosity simplification to vm-core.func. This keeps spinner visuals working when passed through pipes while avoiding backgrounding issues.
This commit is contained in:
CanbiZ (MickLesk)
2026-03-02 09:08:55 +01:00
parent a0ea2263a6
commit f2970522a9
2 changed files with 14 additions and 10 deletions

View File

@@ -352,11 +352,11 @@ clear_line() {
#
# - Determines if script should run in verbose mode
# - Checks VERBOSE and var_verbose variables
# - Also returns true if not running in TTY (pipe/redirect scenario)
# - Note: Non-TTY (pipe) scenarios are handled separately in msg_info()
# ------------------------------------------------------------------------------
is_verbose_mode() {
local verbose="${VERBOSE:-${var_verbose:-no}}"
[[ "$verbose" != "no" || ! -t 2 ]]
[[ "$verbose" != "no" ]]
}
### dev spinner ###