From 8ef8263b44699f6e7d9425d57d3d85c16566b99f Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Fri, 10 Jan 2025 17:29:44 +0100 Subject: [PATCH] improve script compatibility (#210) --- scripts/format.mk | 2 +- scripts/lint.mk | 2 +- scripts/mod-tidy.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/format.mk b/scripts/format.mk index 15b26e6..a929bb5 100644 --- a/scripts/format.mk +++ b/scripts/format.mk @@ -6,5 +6,5 @@ export DOCKERFILE_FORMAT format: echo "$$DOCKERFILE_FORMAT" | docker build -q . -f - -t temp - docker run --rm -it -v $(PWD):/s -w /s temp \ + docker run --rm -it -v $(shell pwd):/s -w /s temp \ sh -c "gofumpt -l -w ." diff --git a/scripts/lint.mk b/scripts/lint.mk index a15abc4..9ce4609 100644 --- a/scripts/lint.mk +++ b/scripts/lint.mk @@ -1,5 +1,5 @@ lint: - docker run --rm -v $(PWD):/app -w /app \ + docker run --rm -v $(shell pwd):/app -w /app \ -e CGO_ENABLED=0 \ $(LINT_IMAGE) \ golangci-lint run -v diff --git a/scripts/mod-tidy.mk b/scripts/mod-tidy.mk index b02d72a..90fd03e 100644 --- a/scripts/mod-tidy.mk +++ b/scripts/mod-tidy.mk @@ -1,3 +1,3 @@ mod-tidy: - docker run --rm -it -v $(PWD):/s -w /s $(BASE_IMAGE) \ + docker run --rm -it -v $(shell pwd):/s -w /s $(BASE_IMAGE) \ sh -c "apk add git && GOPROXY=direct go mod tidy"