From 9c9e31d2b7d8b4278f7c7db7880bac0f472b85b5 Mon Sep 17 00:00:00 2001 From: David Horsman Date: Fri, 9 Oct 2020 17:39:09 +0000 Subject: [PATCH] fix(integ): Fixed rfdk-integ-e2e.sh 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 --- integ/scripts/bash/rfdk-integ-e2e.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integ/scripts/bash/rfdk-integ-e2e.sh b/integ/scripts/bash/rfdk-integ-e2e.sh index 19463fc82..9e6ed47ee 100755 --- a/integ/scripts/bash/rfdk-integ-e2e.sh +++ b/integ/scripts/bash/rfdk-integ-e2e.sh @@ -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