Error if .envrc is blocked

Closes #6
This commit is contained in:
3wc 2020-09-11 12:58:11 +02:00
parent ebb763518a
commit 348e4ca255

7
abra
View File

@ -2,7 +2,12 @@
PROGRAM_NAME=""$(basename "$0") PROGRAM_NAME=""$(basename "$0")
if [ -z "$STACK_NAME" ] || [ -z "$STACK_NAME" ]; then if [ -z "$STACK_NAME" ] || [ -z "$STACK_NAME" ]; then
echo "ERROR: STACK_NAME must be set (e.g. export STACK_NAME=my_cool_app)" echo "$(tput setaf 1)ERROR: STACK_NAME must be set (e.g. export STACK_NAME=my_cool_app)$(tput sgr0 )"
exit
fi
if type direnv 2>&1 > /dev/null && ! direnv status | grep -q 'Found RC allowed true'; then
echo "$(tput setaf 1)ERROR: direnv is blocked, run direnv allow$(tput sgr0)"
exit exit
fi fi