From 9e07821c264f9eea940d25b6a7ef54ffac138029 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 5 Aug 2026 08:25:41 +0200 Subject: [PATCH] shell: always print exit code, even on success Ensures tool output is never blank - at minimum shows 'exit: 0'. --- data/tools/shell | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/tools/shell b/data/tools/shell index e181e54..04d9dbc 100755 --- a/data/tools/shell +++ b/data/tools/shell @@ -30,4 +30,10 @@ fi # Execute the command. The sandbox (landlock) is already applied by toolsrv. # We use eval to handle pipes, redirects, and compound commands. -eval "$cmd" \ No newline at end of file +# Capture output and exit code, always report both. +output=$(eval "$cmd" 2>&1) && rc=$? || rc=$? +if [ -n "$output" ]; then + printf '%s\n' "$output" +fi +echo "exit: $rc" +exit $rc \ No newline at end of file