diff options
author | David Perry <boolean263@protonmail.com> | 2021-03-10 08:22:53 -0500 |
---|---|---|
committer | David Perry <boolean263@protonmail.com> | 2021-08-30 08:01:05 -0400 |
commit | d3d4e4b135b499af7017ac9f86f6c8ad7f22f271 (patch) | |
tree | a907f5389a1083d8cc1149efb0e749f4b67d6449 /ui | |
parent | 3efb3cab62c64fbda2e15b528e87fc7c1c515af4 (diff) |
Show error for `-X lua_script` if no Lua support
Wireshark/tshark may be built without Lua support. This patch adds an
error message if the user specifies the `-X lua_script` command-line
argument to a program built without Lua support, so the user is not left
wondering why their script isn't working.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/commandline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/commandline.c b/ui/commandline.c index 66f7ebe111..de15dcfbd3 100644 --- a/ui/commandline.c +++ b/ui/commandline.c @@ -342,6 +342,13 @@ void commandline_early_options(int argc, char *argv[]) } } +#ifndef HAVE_LUA + if (ex_opt_count("lua_script") > 0) { + cmdarg_err("This version of Wireshark was not built with support for Lua scripting."); + exit(1); + } +#endif + #ifndef HAVE_LIBPCAP if (capture_option_specified) { print_no_capture_support_error(); |