diff --git a/Makefile b/Makefile index 19c88a1abb..4670bf04f7 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,10 @@ ifeq ($(DETECTED_OS),Windows) BINARY_EXT=.exe endif +ifeq ($(DETECTED_OS),Darwin) + GO_BUILDTAGS += fsnotify +endif + BUILD_FLAGS?= TEST_FLAGS?= E2E_TEST?= @@ -62,11 +66,11 @@ build: .PHONY: binary binary: - $(BUILDX_CMD) bake binary + BUILD_TAGS="$(GO_BUILDTAGS)" $(BUILDX_CMD) bake binary .PHONY: binary-with-coverage binary-with-coverage: - $(BUILDX_CMD) bake binary-with-coverage + BUILD_TAGS="$(GO_BUILDTAGS)" $(BUILDX_CMD) bake binary-with-coverage .PHONY: install install: binary diff --git a/pkg/watch/watcher_darwin.go b/pkg/watch/watcher_darwin.go index 16adcf7c25..56da94b353 100644 --- a/pkg/watch/watcher_darwin.go +++ b/pkg/watch/watcher_darwin.go @@ -1,4 +1,4 @@ -//go:build darwin +//go:build fsnotify /* Copyright 2020 Docker Compose CLI authors diff --git a/pkg/watch/watcher_naive.go b/pkg/watch/watcher_naive.go index 2278d10a0f..7798025e8b 100644 --- a/pkg/watch/watcher_naive.go +++ b/pkg/watch/watcher_naive.go @@ -1,4 +1,4 @@ -//go:build !darwin +//go:build !fsnotify /* Copyright 2020 Docker Compose CLI authors