fix: don't kill gentoo install script if it errors before forking

This commit is contained in:
oddlama 2022-04-17 00:05:19 +02:00
parent f4040d9679
commit 82e32ffb1f
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 2 additions and 2 deletions

View File

@ -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
}