Browse Source

build(dev): Only call sw_vers if the OS is Darwin (#22734)

On other operating systems `sw_vers` does not exist.
Armen Zambrano G 4 years ago
parent
commit
ce93ccc498
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Makefile

+ 6 - 1
Makefile

@@ -4,7 +4,12 @@ WEBPACK := yarn build-acceptance
 # Currently, this is only required to install black via pre-commit.
 REQUIRED_PY3_VERSION := $(shell grep "3.6" .python-version)
 
-BIG_SUR := $(shell sw_vers -productVersion | egrep "11\.")
+UNAME := $(shell command -v uname 2> /dev/null)
+ifdef UNAME
+	ifeq ($(shell uname), Darwin)
+		BIG_SUR := $(shell sw_vers -productVersion | egrep "11\.")
+	endif
+endif
 
 bootstrap: develop init-config run-dependent-services create-db apply-migrations build-platform-assets