mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 06:02:07 +03: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 ✅
@ -521,6 +521,10 @@ int main(int argc, char* argv[])
|
|||||||
argv[argc] = nullptr;
|
argv[argc] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Exit false when no arguments are given.
|
||||||
|
if (argc == 1)
|
||||||
|
return 1;
|
||||||
|
|
||||||
auto condition = parse_complex_expression(argv);
|
auto condition = parse_complex_expression(argv);
|
||||||
if (optind != argc - 1)
|
if (optind != argc - 1)
|
||||||
fatal_error("Too many arguments");
|
fatal_error("Too many arguments");
|
||||||
|
Loading…
Reference in New Issue
Block a user