fix detecting NixOS, uname can be deceptive

specifically inside of Docker containers

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-02-25 16:24:00 +01:00
parent 999bb9940e
commit 17e5fc4dd4
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ if [[ ! -x "$(command -v git)" ]]; then
exit 1
fi
if [[ "$(uname -v)" == *NixOS* ]]; then
if [[ "$(source /etc/os-release && echo "${NAME}")" == *NixOS* ]]; then
echo -e "${GRN}Already running NixOS.${RST}"
exit
fi