return instead of exit

This commit is contained in:
pvincent
2026-08-24 16:37:45 +04:00
parent a3c620b901
commit 226605d298
+12 -12
View File
@@ -67,17 +67,17 @@ function sudo_root {
## MAIN
set -Eeuo pipefail
assert_supported_distro
assert_bash
sudo_root
if assert_supported_distro && assert_bash && sudo_root; then
if [[ ! -v MIAOU_BASH_DIR ]]; then
MIAOU_BASH_DIR=/opt/miaou-bash
export MIAOU_BASH_DIR
fi
if [[ ! -v MIAOU_BASH_DIR ]]; then
MIAOU_BASH_DIR=/opt/miaou-bash
export MIAOU_BASH_DIR
fi
deployment_type_adjective="${1:-installed}" # `miaou-bash --self-upgrade` provides the 'upgrade' term
if once_installed; then upgrade; else install; fi
if [[ $deployment_type_adjective == 'installed' ]]; then
exec bash -l
deployment_type_adjective="${1:-installed}" # `miaou-bash --self-upgrade` provides the 'upgrade' term
if once_installed; then upgrade; else install; fi
if [[ $deployment_type_adjective == 'installed' ]]; then
exec bash -l
fi
else
>&2 echo "MIAOU_BASH_ERROR: requirements failure"
fi