Skip to content

Commit 98ea8b3

Browse files
eakmanrqclaude
andcommitted
Fix Makefile guard to handle env vars with special characters
The guard-% macro used shell indirect expansion which breaks when the variable contains JSON (quotes, newlines). Use printenv instead which just checks if the variable is set without expanding its value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: eakmanrq <6326532+eakmanrq@users.noreply.github.com>
1 parent 045c778 commit 98ea8b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ web-test:
166166
pytest -n auto -m "web"
167167

168168
guard-%:
169-
@ if [ "${${*}}" = "" ]; then \
169+
@ if ! printenv ${*} > /dev/null 2>&1; then \
170170
echo "Environment variable $* not set"; \
171171
exit 1; \
172172
fi

0 commit comments

Comments
 (0)