From 17e5fc4dd47a4951cc40c9ac6eaddeabc3b003e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 25 Feb 2020 16:24:00 +0100 Subject: [PATCH] fix detecting NixOS, uname can be deceptive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit specifically inside of Docker containers Signed-off-by: Jakub SokoĊ‚owski --- nix/scripts/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/scripts/setup.sh b/nix/scripts/setup.sh index 5783d1d3ec..412e42ae9c 100755 --- a/nix/scripts/setup.sh +++ b/nix/scripts/setup.sh @@ -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