harness-base: fix python3 -c quoting inside nix string

Two consecutive single quotes ('') inside a Nix indented string (''...'')
are treated as the string-end delimiter, breaking nix evaluation.
Switch the shell -c argument from double-quotes to single-quotes so
the Python string literals use double-quotes instead, avoiding any ''
sequences in the Nix source.
This commit is contained in:
iris 2026-05-20 21:01:26 +02:00
parent e7d7aef1aa
commit ddd0248619

View file

@ -317,7 +317,7 @@
USER=$(curl -sf --max-time 5 \
-H "Authorization: token $TOKEN" \
"$FORGE_URL/api/v1/user" \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('login',''))" \
| python3 -c 'import sys,json; print(json.load(sys.stdin).get("login",""))' \
2>/dev/null || true)
if [ -z "$USER" ]; then
echo "tea-login: could not resolve username from forge API; skipping"