Merge pull request #299 into master
All checks were successful
docker-finance / all (push) Successful in 32m30s

e481faf1 client: lib_docker: `exec`: silence noise when not debugging (Aaron Fiore)
This commit was merged in pull request #299.
This commit is contained in:
2026-02-17 13:13:46 -08:00

View File

@@ -510,9 +510,21 @@ function lib_docker::__shell()
function lib_docker::__exec()
{
[ -z "$DOCKER_FINANCE_DEBUG" ] && lib_utils::die_fatal
# Allocate pseudo-TTY, if needed
# NOTE: interactive is kept for cases in which the passed command requires it
local _tty
test -t 1 && _tty="t"
docker exec -i"$_tty" "$global_container" /bin/bash -i -c "$@"
local -r _exec=("docker" "exec" "-i$_tty" "$global_container" "/bin/bash" "-i" "-c" "$@")
if [ "$DOCKER_FINANCE_DEBUG" -eq 0 ]; then
# Silence `bash: cannot set terminal process group (-1): Inappropriate ioctl for device`
# NOTE: lib_utils error handling will still function as expected
"${_exec[@]}" 2>/dev/null
else
"${_exec[@]}"
fi
}
function lib_docker::__parse_args_edit()