Skip to content

Commit

Permalink
fix(scripts/falco-driver-loader): exit when bpf download fails
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Grasso <[email protected]>
  • Loading branch information
leogr committed May 15, 2020
1 parent 8f6a249 commit e5e17f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/falco-driver-loader
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,10 @@ load_bpf_probe_download() {

echo "* Trying to download a prebuilt eBPF probe from ${URL}"

curl -L --create-dirs "${FALCO_DRIVER_CURL_OPTIONS}" -o "${HOME}/.falco/${BPF_PROBE_FILENAME}" "${URL}"
if ! curl -L --create-dirs "${FALCO_DRIVER_CURL_OPTIONS}" -o "${HOME}/.falco/${BPF_PROBE_FILENAME}" "${URL}"; then
>&2 echo "Download failed"
exit 1;
fi
}

load_bpf_probe() {
Expand Down

0 comments on commit e5e17f1

Please sign in to comment.