cli: Show usage and error on unexpected arguments.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m56s

This commit is contained in:
Cory McWilliams 2025-03-16 12:45:54 -04:00
parent 223e20cbbc
commit 3671051d0e

View File

@ -1485,6 +1485,12 @@ static int _tf_command_run(const char* file, int argc, char* argv[])
} }
} }
for (int i = optind; i < argc; i++)
{
tf_printf("Unexpected argument: %s\n", argv[i]);
show_usage = true;
}
if (show_usage) if (show_usage)
{ {
tf_printf("\n%s run [options]\n\n", file); tf_printf("\n%s run [options]\n\n", file);