Skip to content

Commit 4821eaf

Browse files
committed
make confirm a check- for consistent formatting
1 parent cd31407 commit 4821eaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ setup: # Setup local dev environment
1919
@sleep 1
2020
@echo "Done."
2121

22-
purge: confirm # Clean up all local dev artifacts (node_modules, etc.)
22+
purge: check-confirm # Clean up all local dev artifacts (node_modules, etc.)
2323
@echo "Purging.."
2424
@sleep 1
2525
@echo "Done."
@@ -51,15 +51,15 @@ logs:
5151

5252
# ----------------- COMMON CHECKS --------------------------
5353

54-
confirm: # Simple y/N confirmation
55-
@echo -n "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ] || (echo "Aborted!" && exit 1)
56-
5754
env-MYSQL_HOST: # [CHECK] Checks for env variable
5855
@if test -z ${MYSQL_HOST}; then echo -e "${ERR}Missing ENV VAR: MYSQL_HOST. Use 'ENV_VAR=value make <cmd>'${NC}"; exit 1; fi
5956

6057
arg-target: # [CHECK] Checks if param is present: make key=value
6158
@if [ "$(target)" = "" ]; then echo -e "${ERR}Missing param: target. Use 'make <cmd> arg=value'${NC}"; exit 1; fi
6259

60+
check-confirm: # Simple y/N confirmation
61+
@echo -n "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ] || (echo "Aborted!" && exit 1)
62+
6363
check-dotenv: # [CHECK] Checks if .env file is present
6464
@if [ ! -f ".env" ]; then echo -e "${ERR}Missing .env file. Run 'cp .env.example .env'${NC}"; exit 1; fi
6565

0 commit comments

Comments
 (0)