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