mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Two independent bugs were compounding into a corrupted NIX_CONFIG that broke every local image rebuild: 1. scripts/tests/code/run.sh non-idempotently appended "accept-flake-config = true" to whatever NIX_CONFIG it inherited. On the next source of .env (which carried the previous value back), the line accumulated -- "true\naccept-flake-config = true\n..." -- until Nix rejected the Boolean. Fix: pipe through `awk '\!seen[$0]++'` to dedup lines while preserving order. 2. utils/env/writer.py silently re-encoded literal newlines as `\n` escape sequences inside double-quoted values. docker-compose's --env-file loader does not decode them and neither does bash `source`, so any multi-line value round-tripped into garbage on the next read. Fix: raise ValueError instead -- producers must collapse to a single line before handing off to the env-builder. Test fixtures for the writer adjusted to assert the new raise semantics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>