Skip to content

Commit

Permalink
Fix (ci): Show error if --env-file does not exist (#168)
Browse files Browse the repository at this point in the history
Co-authored-by: Joel Timothy Oh <[email protected]>
  • Loading branch information
leojonathanoh and joeltimothyoh authored Nov 19, 2023
1 parent 9ba010e commit 190b51e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ if [ -f "$ENV_FILE" ]; then
ENV_FILE="$( cd "$( dirname "$ENV_FILE" )" && pwd )/$( basename "$ENV_FILE" )"
echo "Reading env file $ENV_FILE"
. "$ENV_FILE"
else
if [ "$ENV_FILE" = '.env' ]; then
echo "Not reading from .env because it does not exist"
else
echo "env file does not exist: $ENV_FILE"
exit 1
fi
fi

# Process job variables
Expand Down

0 comments on commit 190b51e

Please sign in to comment.