From 9d4af5021bfdfcc6cb7caf7c1f544e5c1ed1f4e3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 15 May 2025 15:02:36 +0200 Subject: [PATCH] add fatal --- misc/core.func | 5 +++++ misc/install.func | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/core.func b/misc/core.func index 52926e4..da2cf31 100644 --- a/misc/core.func +++ b/misc/core.func @@ -233,6 +233,11 @@ detect_os() { esac } +fatal() { + msg_error "$1" + kill -INT $$ +} + ### dev spinner ### # Trap cleanup on various signals trap 'cleanup_spinner' EXIT INT TERM HUP diff --git a/misc/install.func b/misc/install.func index 7876e90..ba93d7e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -140,8 +140,7 @@ network_check() { done if [[ "$DNS_FAILED" == true ]]; then - msg_error "$GITHUB_STATUS" - exit 1 + fatal "$GITHUB_STATUS" else msg_ok "$GITHUB_STATUS" fi