From 136eacc17f4f892f09967a8cbff4019f3a591f81 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 27 Sep 2022 10:14:25 +0200 Subject: [PATCH] chore(scripts): when ENABLE_COMPILE is disabled, exit immediately if target distro could not be fetched. Signed-off-by: Federico Di Pierro Co-authored-by: Leonardo Grasso --- scripts/falco-driver-loader | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/falco-driver-loader b/scripts/falco-driver-loader index 5c1e26bd..bbc00fa2 100755 --- a/scripts/falco-driver-loader +++ b/scripts/falco-driver-loader @@ -710,8 +710,13 @@ if [ -z "$source_only" ]; then get_target_id res=$? if [ $res != 0 ]; then - >&2 echo "Detected an unsupported target system, please get in touch with the Falco community. Trying to compile anyway." - ENABLE_DOWNLOAD= + if [ -n "$ENABLE_COMPILE" ]; then + ENABLE_DOWNLOAD= + >&2 echo "Detected an unsupported target system, please get in touch with the Falco community. Trying to compile anyway." + else + >&2 echo "Detected an unsupported target system, please get in touch with the Falco community." + exit 1 + fi fi if [ -n "$clean" ]; then