1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

Shell: Correct the continue builtin's count guard

This builtin only supports count = 1 (as the error message says), but we
were looking for count = 0.
This commit is contained in:
Ali Mohammad Pur 2023-09-21 02:29:53 +03:30 committed by Jelle Raaijmakers
parent 75fd28014c
commit e2af20a69b

View file

@ -258,7 +258,7 @@ ErrorOr<int> Shell::builtin_continue(Main::Arguments arguments)
if (!parser.parse(arguments, Core::ArgsParser::FailureBehavior::PrintUsage))
return 1;
if (count != 0) {
if (count != 1) {
raise_error(ShellError::EvaluatedSyntaxError, "continue: count must be equal to 1 (NYI)");
return 1;
}