From c308cb3355c01e2d02230dc2ae8705b39c201b8f Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Fri, 10 Jan 2025 17:30:07 +0100 Subject: [PATCH] improve script compatibility (#677) --- 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 15b26e64..a929bb51 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 a15abc47..9ce4609f 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 b02d72ad..90fd03e5 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"