Skip to content

Commit 190b51e

Browse files
Fix (ci): Show error if --env-file does not exist (#168)
Co-authored-by: Joel Timothy Oh <joeltimothyoh@live.com>
1 parent 9ba010e commit 190b51e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ if [ -f "$ENV_FILE" ]; then
109109
ENV_FILE="$( cd "$( dirname "$ENV_FILE" )" && pwd )/$( basename "$ENV_FILE" )"
110110
echo "Reading env file $ENV_FILE"
111111
. "$ENV_FILE"
112+
else
113+
if [ "$ENV_FILE" = '.env' ]; then
114+
echo "Not reading from .env because it does not exist"
115+
else
116+
echo "env file does not exist: $ENV_FILE"
117+
exit 1
118+
fi
112119
fi
113120

114121
# Process job variables

0 commit comments

Comments
 (0)