mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 12:06:44 +00:00
Currently, `tool_app_template::run_async()` crashes when invoked with empty argv (with just `argv[0]` populated). This can happen if the tool app is invoked without any further args, e.g. just invoking `scylla nodetool`. The crash happens because unconditional dereferencing of `argv[1]` to get the current operation. To fix, add an early-exit for this case, just printing a usage message and exiting with exit code 2. Fixes: #16451 Closes scylladb/scylladb#16456 * github.com:scylladb/scylladb: test: add regression tests for invoking tools with no args tools/utils: tool_app_template: handle the case of no args tools/utils: tool_app_template: remove "scylla-" prefix from app name