From b72fc3cd258cddc03f414784d54e7480ada47f52 Mon Sep 17 00:00:00 2001 From: Jacob Beck Date: Thu, 17 Sep 2020 11:45:11 -0600 Subject: [PATCH] fix the new makefile on macos --- Makefile | 5 +++++ docker-compose.yml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 88593741cac..c102d7221a3 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,13 @@ test-quick: .env # This rule creates a file named .env that is used by docker-compose for passing # the USER_ID and GROUP_ID arguments to the Docker image. .env: + @touch .env +ifneq ($(OS),Windows_NT) +ifneq ($(shell uname -s), Darwin) @echo USER_ID=$(shell id -u) > .env @echo GROUP_ID=$(shell id -g) >> .env +endif +endif @time docker-compose build clean: diff --git a/docker-compose.yml b/docker-compose.yml index 220b31edbd0..bf16abf5b6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: dockerfile: Dockerfile args: # Run `make .env` to set $USER_ID and $GROUP_ID - USER_ID: ${USER_ID} - GROUP_ID: ${GROUP_ID} + USER_ID: ${USER_ID:-} + GROUP_ID: ${GROUP_ID:-} command: "/root/.virtualenvs/dbt/bin/pytest" env_file: - ./test.env