You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk err loses argument quoting (breaks node -e / python3 -c) and exits 0 on failure #2985
rtk err <cmd> appears to re-join its argv into a single string and hand it to sh -c, which loses the original argument quoting. Any argument containing shell metacharacters — most commonly node -e '...' or python3 -c '...' — is re-split by the shell and fails with a syntax error.
Worse, the failure is reported as exit 0, so a caller (or an agent) sees a "successful" run that never actually executed the command.
Repro steps
rtk err node -e 'console.log("a")'
Actual:
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `node -e console.log("a")'
echo$?# -> 0
Note the echoed command in the error: the single quotes around console.log("a") are gone, so sh sees the parentheses as unquoted metacharacters.
Running the same command directly works fine:
node -e 'console.log("a")'# -> a
Expected
Two things:
rtk err should preserve argument boundaries — exec the argv directly rather than reconstructing a shell string (or shell-quote each argument before passing to sh -c).
It should propagate the child's exit code. A command that failed to run must not exit 0.
Actual
Quoting is lost, the command never runs, and the exit status is 0.
Impact
rtk err is the recommended wrapper for commands RTK has no dedicated filter for — which is exactly the population of commands most likely to carry -e / -c / quoted arguments. The silent exit-0 makes this especially bad for agents, which will treat the failure as a success.
Version / environment
rtk 0.43.0, macOS arm64 (Darwin 24.6.0)
Note
The exit-code half may share a root cause with #2974 (pnpm/eslint exit code swallowed); the quoting loss looks independent.
rtk err rejoins argv into a shell string (losing quoting on node -e/python3 -c style args) and reports exit 0 even when the command never ran; should exec argv directly and propagate the child's real exit code.
📁 Relevant files
src/err_cmd.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
Closing as a duplicate of #2389, which tracks the same problem with the more complete discussion. Please follow up there; if your case differs in a way that issue does not cover, comment here and it can be reopened.
Activity
pszymkowiak commentedon Jul 14, 2026
🔍 Automated Triage
bughighSummary
rtk err rejoins argv into a shell string (losing quoting on node -e/python3 -c style args) and reports exit 0 even when the command never ran; should exec argv directly and propagate the child's real exit code.
📁 Relevant files
src/err_cmd.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
albatrossflyon-coder commentedon Jul 15, 2026
Hi! I'd like to work on this one. Could you assign it to me?
KuSh commentedon Sep 13, 2026
Closing as a duplicate of #2389, which tracks the same problem with the more complete discussion. Please follow up there; if your case differs in a way that issue does not cover, comment here and it can be reopened.