No description
Find a file
Philip Peterson 19d5c6eecb Fix -env silently not forwarding for -- <cmd> mode (only worked for -script)
Two-layer bug, found while diagnosing why chromium-fork's sccache/MinIO
credentials never reached the remote autoninja invocations in ci runs
#69/#70 (which use exactly this pattern: -env AWS_ACCESS_KEY_ID -env
AWS_SECRET_ACCESS_KEY -- 'export ... && autoninja ...'):

1. buildPayload() only ever built the env map inside its -script branch.
   The plain -- <cmd> branch returned remotePayload{command: ...} with
   env left nil -- so -env flags on a -- <cmd> invocation were silently
   accepted by the CLI parser and then just... dropped. No forwarding,
   and no validation that the named vars even existed locally either
   (LookupEnv was never called for this path at all).

2. Even had (1) not existed, sshExec (the function -- <cmd> actually
   calls) took no env parameter whatsoever -- there was nowhere for a
   populated env map to go. sshExecScript (the -script path) already
   prefixed `export KEY=value` lines onto its script correctly; sshExec
   never did anything equivalent.

Fixed both: buildPayload now builds env unconditionally before branching
on script-vs-command, and sshExec now accepts env and prefixes `export
KEY='value'; ` onto the command string, mirroring sshExecScript.

Verified against a real box: `-env TESTVAR -- 'echo "TESTVAR=$TESTVAR"'`
printed empty before this fix, prints the real value after.
2026-08-07 22:15:12 -08:00
.gitignore Add hetzner-runner: provision/build/teardown tool for ephemeral Chromium build boxes 2026-08-04 00:02:06 -08:00
CHALLENGES.md Add CHALLENGES.md: retrospective on building this runner setup 2026-08-05 23:39:45 -08:00
go.mod Add hetzner-runner: provision/build/teardown tool for ephemeral Chromium build boxes 2026-08-04 00:02:06 -08:00
go.sum Add hetzner-runner: provision/build/teardown tool for ephemeral Chromium build boxes 2026-08-04 00:02:06 -08:00
install-deps.sh Add exec subcommand; split monolithic build.sh into per-phase scripts 2026-08-04 12:15:07 -08:00
main.go Fix -env silently not forwarding for -- <cmd> mode (only worked for -script) 2026-08-07 22:15:12 -08:00
stall-watch.py Add stall-watch.py diagnostic wrapper; fix PTY hang in file upload 2026-08-04 19:27:17 -08:00
sync.sh sync.sh: install 'file' -- install-build-deps.py hard-requires it 2026-08-05 02:45:59 -08:00