fix: correct if/fi nesting in template selection blocks

This commit is contained in:
CanbiZ (MickLesk) 2026-01-27 13:45:38 +01:00
parent 1bb32bbc94
commit a6134095d4

View File

@ -4639,7 +4639,7 @@ create_lxc_container() {
local selected_version
selected_version=$(prompt_select "Select ${PCT_OSTYPE} version:" 1 60 "${AVAILABLE_VERSIONS[@]}")
if [[ -n "$selected_version" ]]; then
# prompt_select always returns a value (uses default in unattended mode)
PCT_OSVERSION="$selected_version"
TEMPLATE_SEARCH="${PCT_OSTYPE}-${PCT_OSVERSION}"
@ -4659,10 +4659,6 @@ create_lxc_container() {
msg_error "No templates available for ${PCT_OSTYPE} ${PCT_OSVERSION}"
exit 225
fi
else
msg_custom "🚫" "${YW}" "Installation cancelled"
exit 0
fi
else
msg_error "No ${PCT_OSTYPE} templates available at all"
exit 225
@ -4698,7 +4694,7 @@ create_lxc_container() {
local selected_version
selected_version=$(prompt_select "Select ${PCT_OSTYPE} version:" 1 60 "${AVAILABLE_VERSIONS[@]}")
if [[ -n "$selected_version" ]]; then
# prompt_select always returns a value (uses default in unattended mode)
export var_version="$selected_version"
export PCT_OSVERSION="$var_version"
msg_ok "Switched to ${PCT_OSTYPE} ${var_version}"
@ -4744,7 +4740,6 @@ create_lxc_container() {
msg_error "Template still not found after version change"
exit 220
}
fi
else
msg_error "No ${PCT_OSTYPE} templates available"
exit 220