From 6a28e4c09e20d0c42a5029fd40bc850574e614f1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:34:35 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/misc/core.func b/misc/core.func index 4442f809..42964889 100644 --- a/misc/core.func +++ b/misc/core.func @@ -262,19 +262,16 @@ ensure_tput() { } is_alpine() { - local os_id="${var_os:-}" + local os_id="${var_os:-${PCT_OSTYPE:-}}" - if [[ -z "$os_id" ]]; then - if [[ -f /etc/os-release ]]; then - os_id="$( - . /etc/os-release 2>/dev/null - echo "${ID:-}" - )" - fi + if [[ -z "$os_id" && -f /etc/os-release ]]; then + os_id="$( + . /etc/os-release 2>/dev/null + echo "${ID:-}" + )" fi - echo "[DEBUG] is_alpine(): os_id='${os_id}'" >&2 - + [[ "${DEBUG:-}" == "true" ]] && echo "[DEBUG] is_alpine(): os_id='${os_id}'" >&2 [[ "$os_id" == "alpine" ]] }