Unquoted $VARIABLE in a shell command, and why my test suite missed it for months

작성자

카테고리:

← 피드로
r/programming · /u/Funky_Chicken_22 · 2026-07-10 개발(SW)

Bug: Config file had this, unchanged for months: "command": "node $CLAUDE_PROJECT_DIR/.claude/hooks/session.js start" Environment variable inside a shell command inside a JSON string. When the runtime reads the JSON and invokes the command through a shell, the shell expands $CLAUDE_PROJECT_DIR and word-splits it. If the expansion…

원문 보기 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다