chore(scripts): when ENABLE_COMPILE is disabled, exit immediately if target distro could not be fetched.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
Federico Di Pierro
2022-09-27 10:14:25 +02:00
committed by poiana
parent c0c0246927
commit 136eacc17f

View File

@@ -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