From 39cf3ee2e9b1cb1a2d5815475c31b7e28df24598 Mon Sep 17 00:00:00 2001 From: Eddy Zhou Date: Sat, 25 Nov 2023 13:14:54 +0000 Subject: [PATCH] we skip exporting environment in ci --- scripts/watod-setup-env.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/watod-setup-env.sh b/scripts/watod-setup-env.sh index d005adbc..c3fbc228 100755 --- a/scripts/watod-setup-env.sh +++ b/scripts/watod-setup-env.sh @@ -16,13 +16,6 @@ MONO_DIR=${MONO_DIR%/*} MODULES_DIR="$MONO_DIR/modules" -# default to the monorepo directory, this is for CI -if [ ! -d "$MODULES_DIR" ]; then - echo "Directory does not exist: $MODULES_DIR" - MODULES_DIR="$MONO_DIR" - echo "Switching to: $MODULES_DIR" -fi - # Allow for local overrides of any of the below parameters if [ -f "$MONO_DIR/watod-config.sh" ]; then source "$MONO_DIR/watod-config.sh" @@ -97,6 +90,11 @@ FOXGLOVE_BRIDGE_PORT=${FOXGLOVE_BRIDGE_PORT:-$((BASE_PORT++))} ## -------------------- Export Environment Variables ------------------------- +# skip this step if the module directory doesn't exist, this is for CI +if [ ! -d "$MODULES_DIR" ]; then + exit 0 +fi + # General echo "# Auto-generated by ${BASH_SOURCE[0]}. Edit at own risk." > "$MODULES_DIR/.env"