Skip to content

Commit

Permalink
fix: Create destination directory if it does not exist.
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
denisse-dev committed Jul 27, 2020
1 parent 0f374a5 commit e169b75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e169b75

Please sign in to comment.