mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
Tolerate unavailable terminal clear during setup
This commit is contained in:
parent
9e55d19c16
commit
d9e82d9378
@ -62,10 +62,10 @@ def test_setup_script_prints_root_safe_runtime_commands():
|
||||
assert "--connect-timeout 1 --max-time 2" in script
|
||||
|
||||
|
||||
def test_setup_script_does_not_clear_without_a_terminal():
|
||||
def test_setup_script_does_not_fail_when_clear_cannot_use_terminal():
|
||||
script = SETUP_SCRIPT.read_text()
|
||||
|
||||
assert "if [ -t 1 ]; then\n clear\nfi" in script
|
||||
assert "if [ -t 1 ]; then\n clear || true\nfi" in script
|
||||
|
||||
|
||||
def test_setup_script_keeps_optional_binary_probes_quiet():
|
||||
|
||||
@ -18,7 +18,7 @@ if (set -o errtrace) 2>/dev/null; then
|
||||
set -o errtrace
|
||||
fi
|
||||
if [ -t 1 ]; then
|
||||
clear
|
||||
clear || true
|
||||
fi
|
||||
|
||||
RUNNING_AS_ROOT="false"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user