From 77c70c5d1b795b55e8cf299764d794352528cd04 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:27:30 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/misc/core.func b/misc/core.func index 8b1c07f1..4442f809 100644 --- a/misc/core.func +++ b/misc/core.func @@ -262,8 +262,20 @@ ensure_tput() { } is_alpine() { - echo "[DEBUG] is_alpine(): var_os='${var_os:-}'" >&2 - [[ "${var_os:-}" == "alpine" ]] + local os_id="${var_os:-}" + + 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() {