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 }