Skip to content

Commit

Permalink
Add set -e to the script�Exit upon error�Will handle the wrong para…
Browse files Browse the repository at this point in the history
…meter passing to the script
  • Loading branch information
jenia81 committed May 15, 2024
1 parent 3a81c4a commit abaeee0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fw-tools/edge-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# allows you to use port 443 as well.
# - k8s and gateway service is available only via port 443.
#
set -e

DEBUG=0
FAILURES=0
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand Down Expand Up @@ -383,8 +385,9 @@ argprocessor() {
--domain) DOMAIN_NAME="$2"; shift 2 ;;
#
--) shift; break ;;
#
*) >&2 echo Unsupported option: "$1"
usage ;;
usage ;;
esac
done

Expand All @@ -393,7 +396,8 @@ argprocessor() {
set -x
fi

# Check if either --env or --domain arguments were provided
# If neither --env or --domain arguments are provided
# The ENV is set to production.
if [[ -z "$ENV" && -z "$DOMAIN_NAME" ]]; then
echo "The env will be set to production."
ENV="production"
Expand Down

0 comments on commit abaeee0

Please sign in to comment.