Skip to content

Commit

Permalink
Stop if DOMAIN isn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonholmgren committed Nov 29, 2023
1 parent bf5fe28 commit adcf16f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ if [[ $1 == "create" ]]; then
read DOMAIN
fi

# If $DOMAIN is still empty, exit
if [[ -z $DOMAIN ]]; then
echo ""
echo -e "${RED}Domain name cannot be empty.${END}"
echo ""
exit 1
fi

# Check for any whitespace in the domain name
if [[ $DOMAIN =~ [[:space:]] ]]; then
echo ""
Expand Down

0 comments on commit adcf16f

Please sign in to comment.