Skip to content

Commit

Permalink
fix: better APPEND_NATIVE_ENTRYPOINT logic (#994)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Jackson <shreddedbacon@users.noreply.github.com>
  • Loading branch information
tobybellwood and shreddedbacon committed May 1, 2024
1 parent 1068b8d commit b5d9d38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion images/commons/lagoon/entrypoints.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ if [ -d /lagoon/entrypoints ]; then
unset i
fi

exec "$@"
# If the image provides a native entrypoint that can, or should, be run after the lagoon endpoints are set, it's path can be
# set in the APPEND_NATIVE_ENTRYPOINT variable.
if [ ! -z "${APPEND_NATIVE_ENTRYPOINT+x}" ]; then
echo "running defined endpoint"
. $APPEND_NATIVE_ENTRYPOINT
fi

exec "$@"
2 changes: 1 addition & 1 deletion images/commons/lagoon/entrypoints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi

# If the image provides a native entrypoint that can, or should, be run after the lagoon endpoints are set, it's path can be
# set in the APPEND_NATIVE_ENTRYPOINT variable.
if [ -n "$APPEND_NATIVE_ENTRYPOINT" ] && [ -f $APPEND_NATIVE_ENTRYPOINT ]; then
if [ ! -z "${APPEND_NATIVE_ENTRYPOINT+x}" ]; then
echo "running defined endpoint"
. $APPEND_NATIVE_ENTRYPOINT
fi
Expand Down

0 comments on commit b5d9d38

Please sign in to comment.