client: lib_docker: exec: only allocate pseudo-TTY when needed

This commit is contained in:
2026-01-21 12:36:46 -08:00
parent cee9948499
commit 7b15588681

View File

@@ -507,7 +507,9 @@ function lib_docker::__shell()
function lib_docker::__exec()
{
docker exec -it "$global_container" /bin/bash -i -c "$@"
local _tty
test -t 1 && _tty="t"
docker exec -i"$_tty" "$global_container" /bin/bash -i -c "$@"
}
function lib_docker::__parse_args_edit()