mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-02 20:40:29 +00: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: https://github.com/SerenityOS/serenity/commit/16fd5753eb3 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…
Reference in a new issue