From c74f656694e084fdf748f7ac86aa4b2361cbe1ed Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 23 Jan 2026 18:02:52 -0600 Subject: Fix set -e compatibility in lib functions - Replace [[ ]] && error pattern with if/then/fi - Pattern causes exit when condition is false with set -e - Fixed in: common.sh, config.sh, disk.sh, install-archzfs Discovered during VM testing: the && short-circuit returns exit code 1 when condition is false, triggering set -e to abort. --- custom/lib/common.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'custom/lib/common.sh') diff --git a/custom/lib/common.sh b/custom/lib/common.sh index a41441d..2f8844e 100644 --- a/custom/lib/common.sh +++ b/custom/lib/common.sh @@ -42,7 +42,9 @@ log() { ############################# require_root() { - [[ $EUID -ne 0 ]] && error "This script must be run as root" + if [[ $EUID -ne 0 ]]; then + error "This script must be run as root" + fi } command_exists() { -- cgit v1.2.3