From 82e32ffb1f2288318f7a4e28e4de0579c33ca9f5 Mon Sep 17 00:00:00 2001 From: oddlama Date: Sun, 17 Apr 2022 00:05:19 +0200 Subject: [PATCH] fix: don't kill gentoo install script if it errors before forking --- scripts/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/utils.sh b/scripts/utils.sh index ae894fa..c8d4c84 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -19,8 +19,8 @@ function eerror() { function die() { eerror "$*" - [[ $$ == "$GENTOO_INSTALL_REPO_SCRIPT_PID" ]] \ - || kill "$GENTOO_INSTALL_REPO_SCRIPT_PID" + [[ -v GENTOO_INSTALL_REPO_SCRIPT_PID && $$ -ne $GENTOO_INSTALL_REPO_SCRIPT_PID ]] \ + && kill "$GENTOO_INSTALL_REPO_SCRIPT_PID" exit 1 }