From 119e63cd46889d6534bd6708ebd1a1ac83ed68c5 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 1 Aug 2026 05:08:56 -0700 Subject: [PATCH] Skip browser opening in headless setup --- archivebox/tests/test_setup_script.py | 1 + bin/setup.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/archivebox/tests/test_setup_script.py b/archivebox/tests/test_setup_script.py index 072bac26..1822ce35 100644 --- a/archivebox/tests/test_setup_script.py +++ b/archivebox/tests/test_setup_script.py @@ -72,6 +72,7 @@ def test_setup_script_keeps_optional_binary_probes_quiet(): assert "resolve_setup_binary open env false 2>/dev/null" in script assert "resolve_setup_binary docker env false 2>/dev/null" in script + assert 'if [ -n "$OPEN_BINARY" ] && [ -t 1 ]; then' in script def test_setup_script_moves_legacy_collection_without_moving_compose(tmp_path): diff --git a/bin/setup.sh b/bin/setup.sh index af4c8792..4b374fb8 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -201,7 +201,7 @@ wait_for_archivebox() { } open_archivebox() { - if [ -n "$OPEN_BINARY" ]; then + if [ -n "$OPEN_BINARY" ] && [ -t 1 ]; then "$OPEN_BINARY" "http://127.0.0.1:8000" || true fi }