diff --git a/install/swizzin-install.sh b/install/swizzin-install.sh index 888a836b..34707e63 100644 --- a/install/swizzin-install.sh +++ b/install/swizzin-install.sh @@ -21,8 +21,7 @@ echo read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then msg_error "Aborted by user. No changes have been made." - destroy_lxc - exit 1 + exit 10 fi bash <(curl -sL s5n.sh) diff --git a/misc/build.func b/misc/build.func index 36cb530d..97ef9a8b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1428,8 +1428,12 @@ EOF' fi msg_ok "Customized LXC Container" - if ! lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/"$var_install".sh)"; then - exit $? + if ! lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)"; then + EXITCODE=$? + if [[ $EXITCODE -eq 10 ]]; then + destroy_lxc + fi + exit $EXITCODE fi } diff --git a/misc/tools.func b/misc/tools.func index 04688d40..b6451ad1 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -544,7 +544,7 @@ function setup_composer() { fi chmod +x "$COMPOSER_BIN" - composer diagnose >/dev/null 2>&1 + $STD composer diagnose msg_ok "Setup Composer" }