cli: Show usage and error on unexpected arguments.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m56s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m56s
This commit is contained in:
parent
223e20cbbc
commit
3671051d0e
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user