Update core.func

This commit is contained in:
CanbiZ 2025-07-04 13:27:30 +02:00
parent 03825ae872
commit 77c70c5d1b

View File

@ -262,8 +262,20 @@ ensure_tput() {
} }
is_alpine() { is_alpine() {
echo "[DEBUG] is_alpine(): var_os='${var_os:-}'" >&2 local os_id="${var_os:-}"
[[ "${var_os:-}" == "alpine" ]]
if [[ -z "$os_id" ]]; then
if [[ -f /etc/os-release ]]; then
os_id="$(
. /etc/os-release 2>/dev/null
echo "${ID:-}"
)"
fi
fi
echo "[DEBUG] is_alpine(): os_id='${os_id}'" >&2
[[ "$os_id" == "alpine" ]]
} }
is_verbose_mode() { is_verbose_mode() {