libstd.bash: redirect output of 'which lsb_release' to /dev/null

lsb_release might not be installed!
This commit is contained in:
2022-06-13 10:14:36 +02:00
parent 67df5ba324
commit 27018d9be0
+2 -2
View File
@@ -289,11 +289,11 @@ std::upvar() {
}
std.get_os_release_linux() {
local lsb_release=$(which lsb_release)
#local lsb_release=$(which lsb_release)
local ID=''
local VERSION_ID=''
if [[ -n $(which lsb_release) ]]; then
if [[ -n $(which lsb_release 2>/dev/null) ]]; then
ID=$(lsb_release -is)
VERSION_ID=$(lsb_release -rs)
elif [[ -r '/etc/os-release' ]]; then