Follow-up Comment #1, bug #65880 (group grub):
Hi,
i can confirm that it happens on Debian 12 with the Debian amd64 package
grub-common (2.06-13+deb12u1) (plus grub-efi-amd64 , grub-efi-amd64-bin ,
grub-efi-amd64-signed , grub2-common) and also with a git clone of today.
The change at the end of this comment fixes the problem for me (and
mimicks the error message of Debian 8 which does not show the problem).
Debian-8 binary:
grub-mkrescue: option requires an argument -- 'k'
Try 'grub-mkrescue --help' or 'grub-mkrescue --usage' for more information.
Changed git clone:
$ ./grub-mkrescue -k
./grub-mkrescue: error: option requires an argument -- '-k'.
$ echo $?
1
Please try whether the change works for you, too.
Have a nice day :)
Thomas
--------------------------------------------------------------------------
--- util/grub-mkrescue.c.orig 2024-06-14 14:34:18.109255492 +0200
+++ util/grub-mkrescue.c 2024-06-14 14:37:18.052729569 +0200
@@ -477,6 +477,9 @@ main (int argc, char *argv[])
for (i = 1; i < argc; i++)
{
if (strcmp (argv[i], "-output") == 0) {
+ if (i + 1 >= argc)
+ grub_util_error ("%s -- '%s'", _("option requires an argument"),
+ argv[i]);
argp_argv[argp_argc++] = (char *) "--output";
i++;
argp_argv[argp_argc++] = argv[i];
@@ -485,6 +488,9 @@ main (int argc, char *argv[])
switch (args_to_eat (argv[i]))
{
case 2:
+ if (i + 1 >= argc)
+ grub_util_error ("%s -- '%s'", _("option requires an
argument"),
+ argv[i]);
argp_argv[argp_argc++] = argv[i++];
/* Fallthrough */
case 1:
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65880>
{savane: Include the next line when replying by email.}
{savane: user = [email protected]; tracker = bugs; item = 65880}
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/