From e169b7533d004f2e975ff8b14cabd47b278f29b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Denisse=20G=C3=B3mez?= Date: Mon, 27 Jul 2020 11:13:04 -0500 Subject: [PATCH] fix: Create destination directory if it does not exist. 1. Why is this change neccesary? Because the destination directory may not exist on the users machine. 2. How does it address the issue? By implementing an order-only prerequisite to the copy recipe that creates the destination directory if it does not exist. 3. What side effects does this change have? None! --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e61f6a5..e56acbc 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,12 @@ DST ?= ~/.bin/ terraform-lsp: go build -ldflags "-X main.GitCommit=$(COMMIT) -X main.Version=$(VERSION) -X main.Date=$(DATE)" -copy: terraform-lsp +copy: terraform-lsp | create-dir cp ./terraform-lsp $(DST) && cp ./terraform-lsp ~/ +create-dir: + mkdir -p $(DST) + clean: rm -f terraform-lsp