fix(image): resolve owner.sh from the script directory, not the cwd

build.sh called scripts/meta/resolve/repository/owner.sh by a path relative to the working directory. Whenever OWNER, GITHUB_REPOSITORY_OWNER or GITHUB_REPOSITORY reached it, a build started outside the repository root exited 127. TestBuildCachePrune runs build.sh from a temporary directory, so CI (which carries an owner variable) failed four tests while a local run without one passed.

The call now goes through _build_script_dir. The test sets GITHUB_REPOSITORY_OWNER, so it takes this path on every machine.

🎯 Fix: 95 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: ~100 %
🏆 Score: 94
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5.5 committed 2026-11-12 21:51:47 +00:00
1 parent 425f2ce759
commit 6be651b79e
2 files changed
+3 -2

No files matched your search

@@ -57,9 +57,10 @@ def _build(prune_help: str, cap: str) -> tuple[int, list[str], str]:
"INFINITO_PYTHON_INSTALL_SCRIPT": "python.sh",
"INFINITO_DOCKER_CLI_INSTALL_SCRIPT": "docker-cli.sh",
"INFINITO_BUILD_CACHE_MAX_SIZE": cap,
"GITHUB_REPOSITORY_OWNER": "probe-owner",
}
)
for key in ("GITHUB_REPOSITORY", "GITHUB_REPOSITORY_OWNER", "OWNER"):
for key in ("GITHUB_REPOSITORY", "OWNER"):
env.pop(key, None)
done = subprocess.run(
["bash", str(SCRIPT), "--tag", "probe/debian:dev-1"],