From c65edb15068b763fbd9e8e1afd014ab53064ad14 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Mon, 25 Sep 2023 16:22:56 +0100 Subject: [PATCH] fix linux installer warning logs (#588) --- scripts/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 8e536013..c5818f08 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -6,6 +6,7 @@ set -eu status() { echo ">>> $*" >&2; } error() { echo "ERROR $*"; exit 1; } +warning() { echo "WARNING: $*"; } TEMP_DIR=$(mktemp -d) cleanup() { rm -rf $TEMP_DIR; } @@ -95,7 +96,7 @@ fi check_gpu() { case $1 in lspci) command -v lspci >/dev/null && lspci -d '10de:' | grep -q 'NVIDIA' || return 1 ;; - lshw) command -v lshw >/dev/null && lshw -c display -numeric | grep -q 'vendor: .* \[10DE\]' || return 1 ;; + lshw) command -v lshw >/dev/null && $SUDO lshw -c display -numeric | grep -q 'vendor: .* \[10DE\]' || return 1 ;; nvidia-smi) command -v nvidia-smi >/dev/null || return 1 ;; esac }