aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-19 02:19:04 -0500
committerCraig Jennings <c@cjennings.net>2026-05-19 02:19:04 -0500
commitb6d737fc9e3cee641afe7b855c5356122537850b (patch)
tree75d33c59bcee47fe97a0fd0ace5398de98dd6c9f /scripts
parent33579ee72ed97a671a898267555a50fb8411144b (diff)
downloadarchangel-b6d737fc9e3cee641afe7b855c5356122537850b.tar.gz
archangel-b6d737fc9e3cee641afe7b855c5356122537850b.zip
refactor: wire validate_config into the unattended install path
validate_config in lib/config.sh was unreachable from main(). Its empty-field checks duplicated four lines in gather_input's unattended branch. validate_config also has two checks gather_input doesn't: that every entry in SELECTED_DISKS is a real block device, and that TIMEZONE exists under /usr/share/zoneinfo. Neither check ever ran. A config with a typo'd disk path slipped past gather_input and surfaced as an obscure sgdisk error inside the destructive partitioning step. I wired validate_config into main() after validate_filesystem, gated on UNATTENDED so it only runs against an already-loaded config. I dropped the four duplicate empty-field checks from gather_input's unattended branch. The filesystem-specific passphrase checks stay there because they're coupled to the FILESYSTEM branch logic. validate_config reports every missing field at once instead of dying on the first. A config with five missing fields tells you all five in one pass. I removed the four corresponding gather_input bats tests. validate_config's existing unit tests in test_config.bats already cover their assertions. Bats: 178 → 174.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions