From 99460cb05ea0c08032cd4924956dd712f5f364fa Mon Sep 17 00:00:00 2001 From: librelad Date: Sun, 24 May 2026 13:05:24 +0100 Subject: [PATCH] fix(rooted): run dockerCommandRun via bash -c so pipes/redirects work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rooted branch executed the command string as bare $command, which word-splits without shell interpretation: pipes, redirects, && and quoted Go templates were passed as literal argv to a single process. Nearly every caller relies on shell syntax (docker ps | xargs -r ..., cd && docker compose, --format='{{...}}', > /dev/null), so rooted mode silently mishandled them — most visibly dockerStartAllApps after its pipe rewrite, which failed with 'unknown shorthand flag: r'. Run via bash -c like the rootless path so both modes share identical shell semantics. No caller uses the sudo type arg. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- scripts/docker/command/docker_run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docker/command/docker_run.sh b/scripts/docker/command/docker_run.sh index 54091d8..face706 100755 --- a/scripts/docker/command/docker_run.sh +++ b/scripts/docker/command/docker_run.sh @@ -9,9 +9,9 @@ dockerCommandRun() dockerCommandRunInstallUser "$command" elif [[ $CFG_DOCKER_INSTALL_TYPE == "rooted" ]]; then if [[ $type == "sudo" ]]; then - sudo $command + sudo bash -c "$command" else - $command + bash -c "$command" fi fi }