diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-23 18:02:52 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-23 18:02:52 -0600 |
| commit | c74f656694e084fdf748f7ac86aa4b2361cbe1ed (patch) | |
| tree | c015ff6752ee648925a690f04782eff3e8be6b2a /custom/lib/disk.sh | |
| parent | 8e4b16e481db5236d67e7a10e206cccd0e3285cd (diff) | |
| download | archangel-c74f656694e084fdf748f7ac86aa4b2361cbe1ed.tar.gz archangel-c74f656694e084fdf748f7ac86aa4b2361cbe1ed.zip | |
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.
Diffstat (limited to 'custom/lib/disk.sh')
| -rw-r--r-- | custom/lib/disk.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/custom/lib/disk.sh b/custom/lib/disk.sh index ea8c402..fa3dbd2 100644 --- a/custom/lib/disk.sh +++ b/custom/lib/disk.sh @@ -148,7 +148,9 @@ select_disks() { read -rp "Enter disk path(s) separated by space: " selected fi - [[ -z "$selected" ]] && error "No disk selected" + if [[ -z "$selected" ]]; then + error "No disk selected" + fi # Extract just the device paths (remove size/model info) SELECTED_DISKS=() |
