Skip to content

Commit 017eae6

Browse files
committed
Fix fix for empty FLOW_CONTEXT in Local Beach
In (recent) Local Beach projects, `FLOW_CONTEXT` is set to an empty value if not given in the environment. This lead to `FLOW_CONTEXT` being empty, breaking configuration of Flow. This fixes replacament of the check for being set with a check for not being empty to fix this by also checking for the variable to be set. Otherwise it resulted in `FLOW_CONTEXT: unbound variable` during startup.
1 parent e5dbbab commit 017eae6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

root-files/opt/flownative/lib/beach.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ export BEACH_PROJECT_NAME=${BEACH_PROJECT_NAME:-}
3434
export BEACH_FLOW_BASE_CONTEXT=${BEACH_FLOW_BASE_CONTEXT:-Production}
3535
export BEACH_FLOW_SUB_CONTEXT=${BEACH_FLOW_SUB_CONTEXT:-Instance}
3636
export BEACH_FLOW_CONTEXT=${BEACH_FLOW_BASE_CONTEXT}/Beach/${BEACH_FLOW_SUB_CONTEXT}
37-
if [[ -z "$FLOW_CONTEXT" ]]; then
38-
export FLOW_CONTEXT=${BEACH_FLOW_CONTEXT}
39-
else
37+
if [[ -v FLOW_CONTEXT && ! -z "$FLOW_CONTEXT" ]]; then
4038
export FLOW_CONTEXT
39+
else
40+
export FLOW_CONTEXT=${BEACH_FLOW_CONTEXT}
4141
fi
4242
4343
export BEACH_DATABASE_HOST=${BEACH_DATABASE_HOST:-}

0 commit comments

Comments
 (0)