fix: remove normalizeNodeEval that breaks multiline node -e scripts#361
fix: remove normalizeNodeEval that breaks multiline node -e scripts#361
Conversation
The normalizeNodeEval function replaced real newlines with literal \n in node -e script arguments. This broke multiline scripts loaded from YAML exec blocks (e.g. slack-send-dm workflow) because Node.js received the entire script as a single line with literal \n sequences instead of actual newlines, causing SyntaxError: Invalid or unexpected token. Commands are executed via child_process.exec() which passes them through /bin/sh -c, so multiline content inside quoted arguments is preserved correctly by the shell. The normalization was unnecessary and harmful. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Overview: Remove
|
✅ Security Check PassedNo security issues found – changes LGTM. ✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. ✅ Quality Check PassedNo quality issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-02-15T16:29:13.298Z | Triggered by: pr_opened | Commit: a359ffa 💡 TIP: You can chat with Visor using |
Summary
normalizeNodeEvalfunction fromcommand-check-provider.tsthat incorrectly escaped newlines innode -escript argumentsexecblocks (e.g.slack-send-dmworkflow) by replacing real newlines with literal\nsequences, causingSyntaxError: Invalid or unexpected tokenin Node.jschild_process.exec()which passes them through/bin/sh -c, so multiline content inside quoted arguments works correctly without any normalizationTest plan
slack-send-dmworkflow — script executes correctly with proper multiline renderingnpm run buildsucceeds🤖 Generated with Claude Code