distro: Fixed file error

This commit is contained in:
Dylan Araps 2018-06-05 12:19:18 +10:00
parent f847b05e32
commit bc9fd232e4
1 changed files with 1 additions and 1 deletions

View File

@ -860,7 +860,7 @@ get_distro() {
# Chrome OS doesn't conform to the /etc/*-release standard.
# While the file is a series of variables they can't be sourced
# by the shell since the values aren't quoted.
elif [[ "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
elif [[ -f /etc/lsb-release && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)"
elif [[ -f "/etc/os-release" || \