Skip to content

Commit

Permalink
Fix deprecated use of zeek-config --caf_root.
Browse files Browse the repository at this point in the history
This flag became deprecated with zee-5.0.0 and went away some time
after. Only use it if `zeek-config` actually still supports the flag.
  • Loading branch information
bbannier committed Nov 15, 2022
1 parent ad7379a commit f330885
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion features/plugin/configure
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,14 @@ if [ -z "$zeekdist" ]; then
fi

if [ -z "$caf_root" ]; then
append_cache_entry CAF_ROOT_DIR PATH "$(${zeek_config} --caf_root)"
# The `--caf_root` flag became deprecated with zeek-5.0.0 and was
# removed some time after. Only use it if `zeek-config` actually still
# supports it.
#
# TODO: Remove this whole block once support for <=zeek-4.x.x is dropped.
if zeek-config --caf_root >/dev/null 2>&1; then
append_cache_entry CAF_ROOT_DIR PATH "$(${zeek_config} --caf_root)"
fi
fi
else
if [ ! -e "$zeekdist/zeek-path-dev.in" ]; then
Expand Down

0 comments on commit f330885

Please sign in to comment.