mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
fix: isolate system docs snippets from CI tool overrides
This commit is contained in:
parent
ee381e7333
commit
4b16280b5d
@ -388,7 +388,7 @@ def run_snippets(snippet_ids: tuple[str, ...]) -> None:
|
||||
system_lib_dir.mkdir(parents=True, exist_ok=True)
|
||||
system_lib_dir.chmod(0o777)
|
||||
if record["environment"] == "root":
|
||||
for inherited_binary in ("UV_BINARY", "PYTHON_BINARY", "SUDO_BINARY", "DOCKER_BINARY"):
|
||||
for inherited_binary in ("BASH_BINARY", "UV_BINARY", "PYTHON_BINARY", "SUDO_BINARY", "DOCKER_BINARY"):
|
||||
snippet_env.pop(inherited_binary, None)
|
||||
snippet_env["PATH"] = os.pathsep.join(
|
||||
[
|
||||
@ -419,7 +419,7 @@ def run_snippets(snippet_ids: tuple[str, ...]) -> None:
|
||||
workdirs[record["scenario"]].mkdir(parents=True)
|
||||
print(f"Running {snippet.id}: {snippet.path}:{snippet.line} ({record['scenario']})", flush=True)
|
||||
if snippet.syntax in {"bash", "sh", "console"}:
|
||||
bash = Path(snippet_env["BASH_BINARY"])
|
||||
bash = Path(snippet_env.get("BASH_BINARY", env["BASH_BINARY"]))
|
||||
assert bash.is_file() and os.access(bash, os.X_OK)
|
||||
subprocess.run(
|
||||
[bash, "-Eeuo", "pipefail", "-c", snippet.code],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user