From e5821b765e8b24031044a1a9bdb1ba98d2224a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Mon, 18 Nov 2024 02:37:24 +0100 Subject: [PATCH] Add protection against missing lsb_release in the setup summary script --- docs/troubleshooting/summarise_o2p_setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/troubleshooting/summarise_o2p_setup.sh b/docs/troubleshooting/summarise_o2p_setup.sh index fe083995..9ead2ca3 100644 --- a/docs/troubleshooting/summarise_o2p_setup.sh +++ b/docs/troubleshooting/summarise_o2p_setup.sh @@ -4,10 +4,10 @@ # System info -systemName="" -user="" +systemName="Failed to get" +user="Failed to get" if [[ "$OSTYPE" == "linux-gnu"* ]]; then - systemName="$(lsb_release -ds)" + [[ -n "$(which lsb_release)" ]] && systemName="$(lsb_release -ds)" user="$(whoami)" elif [[ "$OSTYPE" == "darwin"* ]]; then systemName="$(sw_vers -productName) $(sw_vers -productVersion)"