Skip to content

Commit

Permalink
Do not attempt mv on bin if it already exists, ignore cloud-nuke configs
Browse files Browse the repository at this point in the history
When GitHub Actions runs the 'make cli-install' target it fails
because the GOBIN is already set to ./bin.  GitHub appears to
use a 'mv' that by default does not wish to clobber the file
that now exists (even with -f specified), so place a check in
front of the 'mv' to prevent it from ever running if the file
exists there.  This does not change the existing behavior of
the make target as it does not run if a file exists anyways.

Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi committed Aug 26, 2024
1 parent 1bd2311 commit de72c8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ dist
go.work
go.work.sum

# cloud nuke config
*cloud_nuke.yaml

# editors
.idea
*.swp
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,6 @@ set -e; \
package=$(2)@$(3) ;\
echo "Downloading $${package}" ;\
GOBIN=$(LOCALBIN) go install $${package} ;\
mv "$$(echo "$(1)" | sed "s/-$(3)$$//")" $(1) ;\
if [ ! -f $(1) ]; then mv -f "$$(echo "$(1)" | sed "s/-$(3)$$//")" $(1); fi ;\
}
endef

0 comments on commit de72c8c

Please sign in to comment.