Skip to content

Commit

Permalink
fix(integ): fix when PRE_COMPONENT_HOOK is undefined (#166)
Browse files Browse the repository at this point in the history
Fixes a bug where we were referencing the environment variable
PRE_COMPONENT_HOOK in a way that would fail if it were unassigned.

Fixes #164
  • Loading branch information
horsmand committed Oct 9, 2020
1 parent 5b663ca commit b4bfd4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integ/scripts/bash/rfdk-integ-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for COMPONENT in **/cdk.json; do
COMPONENT_ROOT="$(dirname "$COMPONENT")"
COMPONENT_NAME=$(basename "$COMPONENT_ROOT")
# Invoke hook function if it is exported and name is defined in PRE_COMPONENT_HOOK variable
if [ -n "$PRE_COMPONENT_HOOK" ] && [ "$(type -t $PRE_COMPONENT_HOOK)" == "function" ]
if [ ! -z "${PRE_COMPONENT_HOOK+x}" ] && [ "$(type -t $PRE_COMPONENT_HOOK)" == "function" ]
then
$PRE_COMPONENT_HOOK $COMPONENT_NAME
fi
Expand Down

0 comments on commit b4bfd4e

Please sign in to comment.