mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
Userland: Make test exit 1 silently when no arguments are given
This commit is contained in:
parent
acfae91032
commit
16fd5753eb
Notes:
sideshowbarker
2024-07-19 04:46:54 +09:00
Author: https://github.com/petelliott
Commit: 16fd5753eb
Pull-request: https://github.com/SerenityOS/serenity/pull/2812
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 4 additions and 0 deletions
|
@ -521,6 +521,10 @@ int main(int argc, char* argv[])
|
|||
argv[argc] = nullptr;
|
||||
}
|
||||
|
||||
// Exit false when no arguments are given.
|
||||
if (argc == 1)
|
||||
return 1;
|
||||
|
||||
auto condition = parse_complex_expression(argv);
|
||||
if (optind != argc - 1)
|
||||
fatal_error("Too many arguments");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue