From fd0f69b91090fd58eef1a74b721962b472d03897 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Tue, 27 Jan 2026 11:06:23 +0100 Subject: [PATCH 1/2] fix: handle no-network gracefully in install_test.sh Wrap active_internet_connection call in an if statement so the return code is consumed by the conditional rather than causing the set_up_before_script hook to fail when BASHUNIT_NO_NETWORK=true or when no network tools are available. Fixes #582 --- tests/acceptance/install_test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/install_test.sh b/tests/acceptance/install_test.sh index ba16e38f..33425cff 100644 --- a/tests/acceptance/install_test.sh +++ b/tests/acceptance/install_test.sh @@ -8,8 +8,11 @@ HAS_DOWNLOADER=0 HAS_GIT=0 function set_up_before_script() { - bashunit::env::active_internet_connection - ACTIVE_INTERNET=$? + if bashunit::env::active_internet_connection; then + ACTIVE_INTERNET=0 + else + ACTIVE_INTERNET=1 + fi if bashunit::dependencies::has_curl || bashunit::dependencies::has_wget; then HAS_DOWNLOADER=1 fi From 711a460086b0fef2c5f5801d0a3118be2e45ddb3 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Tue, 27 Jan 2026 11:28:13 +0100 Subject: [PATCH 2/2] docs: update changelog for issue #582 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16b0ebf9..d7534802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ - Useful for CI/CD pipelines or log-restricted environments - Can also be set via `BASHUNIT_NO_PROGRESS=true` environment variable +### Fixed +- Self-test `tests/acceptance/install_test.sh` now passes when no network tools are available (Issue #582) + - Tests skip gracefully with `BASHUNIT_NO_NETWORK=true` or in sandboxed environments + ## [0.32.0](https://github.com/TypedDevs/bashunit/compare/0.31.0...0.32.0) - 2026-01-12 ### Changed