From 03423f82fc5803007f194d048d435acdcdd32386 Mon Sep 17 00:00:00 2001 From: Michele Zanotti Date: Mon, 5 Aug 2024 11:21:23 +0200 Subject: [PATCH] fix linting target --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 68a50da..59d4ff5 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,11 @@ doc: ## Generate the doc .PHONY: lint lint: ## Lint the codebase @echo "\033[0;33m[Linting...]\033[0m" - @(which tflint && tflint) || docker run --rm -v $$(pwd):/data -t ghcr.io/terraform-linters/tflint + @if command -v tflint > /dev/null; then \ + tflint; \ + else \ + docker run --rm -v $$(pwd):/data -t ghcr.io/terraform-linters/tflint; \ + fi @echo "${OK}" .PHONY: validate