Skip to content

Commit

Permalink
Fix: Deprecated $GOPATH reliability (#127)
Browse files Browse the repository at this point in the history
Closes #74;
Closes #111;
  • Loading branch information
andrerocco authored Nov 21, 2023
1 parent f13c6bb commit 4bb477f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/template/framework/files/makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ clean:

# Live Reload
watch:
@if [ -x "$(GOPATH)/bin/air" ]; then \
"$(GOPATH)/bin/air"; \
@echo "Watching...";\
@if command -v air > /dev/null; then \
air; \
echo "Watching...";\
else \
read -p "air is not installed. Do you want to install it now? (y/n) " choice; \
if [ "$$choice" = "y" ]; then \
go install github.com/cosmtrek/air@latest; \
"$(GOPATH)/bin/air"; \
@echo "Watching...";\
read -p "Go's 'air' is not installed on your machine. Do you want to install it? [Y/n] " choice; \
if [ "$$choice" != "n" ] && [ "$$choice" != "N" ]; then \
go install github.com/cosmtrek/air@latest; \
air; \
echo "Watching...";\
else \
echo "You chose not to install air. Exiting..."; \
exit 1; \
Expand Down

0 comments on commit 4bb477f

Please sign in to comment.