From da7947f89ffd81748e2cd3a34b0aed83582fa700 Mon Sep 17 00:00:00 2001 From: Keith Harvey Date: Tue, 11 Aug 2026 13:57:52 -0600 Subject: [PATCH] common: drop script(1) wrapper from distrobox_exec_interactive bar::units-shell and bar::lx-shell died with scripts/common.sh: line 250: exec: script: not found on hosts without script(1). Fedora ships it in a separate util-linux-script subpackage, and image-based distros don't necessarily pull that in -- Bazzite 44 doesn't, so both recipes were unusable there. The wrapper isn't needed. A just recipe inherits the caller's terminal on stdin and stdout, and distrobox enter allocates a tty itself unless it finds neither. Calling it directly also drops the printf %q dance, which only existed because script parses its argument through /bin/sh. --- scripts/common.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/common.sh b/scripts/common.sh index 5e3be9b7..abc4f117 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -232,8 +232,8 @@ enter_distrobox() { fi } -# run a single interactive command inside the distrobox with a real PTY. -# script(1) is the PTY wrapper; it parses its arg via /bin/sh, hence printf %q. +# run a single interactive command inside the distrobox; distrobox enter +# allocates the tty itself when the caller has one distrobox_exec_interactive() { if _in_container; then exec "$@" @@ -242,10 +242,5 @@ distrobox_exec_interactive() { err "DEVTOOLS_DISTROBOX not set. Run: just setup::distrobox" return 1 fi - local quoted_box quoted_cmd="" arg - quoted_box="$(printf '%q' "$DEVTOOLS_DISTROBOX")" - for arg in "$@"; do - quoted_cmd+=" $(printf '%q' "$arg")" - done - exec script -qec "distrobox enter ${quoted_box} --${quoted_cmd}" /dev/null + exec distrobox enter "$DEVTOOLS_DISTROBOX" -- "$@" }