diff --git a/misc/api.func b/misc/api.func index 783e03909..1cf9ab3f4 100644 --- a/misc/api.func +++ b/misc/api.func @@ -91,8 +91,8 @@ detect_repo_source() { community-scripts/ProxmoxVED) REPO_SOURCE="ProxmoxVED" ;; "") # No URL detected — use hardcoded fallback - # CI sed transforms this on promotion: ProxmoxVED → ProxmoxVE - REPO_SOURCE="ProxmoxVED" + # This value must match the repo: ProxmoxVE for production, ProxmoxVED for dev + REPO_SOURCE="ProxmoxVE" ;; *) # Fork or unknown repo @@ -335,7 +335,7 @@ detect_gpu() { GPU_PASSTHROUGH="unknown" local gpu_line - gpu_line=$(lspci 2>/dev/null | grep -iE "VGA|3D|Display" | head -1) + gpu_line=$(lspci 2>/dev/null | grep -iE "VGA|3D|Display" | head -1 || true) if [[ -n "$gpu_line" ]]; then # Extract model: everything after the colon, clean up @@ -374,7 +374,7 @@ detect_cpu() { if [[ -f /proc/cpuinfo ]]; then local vendor_id - vendor_id=$(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') + vendor_id=$(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ' || true) case "$vendor_id" in GenuineIntel) CPU_VENDOR="intel" ;; @@ -388,7 +388,7 @@ detect_cpu() { esac # Extract model name and clean it up - CPU_MODEL=$(grep -m1 "model name" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ *//' | sed 's/(R)//g' | sed 's/(TM)//g' | sed 's/ */ /g' | cut -c1-64) + CPU_MODEL=$(grep -m1 "model name" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ *//' | sed 's/(R)//g' | sed 's/(TM)//g' | sed 's/ */ /g' | cut -c1-64 || true) fi export CPU_VENDOR CPU_MODEL