mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-07 07:02:43 +00:00
abuild-tar: improve invalid opt handling
make sure we always print usage help text if we have an invalid option. fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10101
This commit is contained in:
parent
2d446f094c
commit
6ef57910ab
@ -385,7 +385,10 @@ int main(int argc, char **argv)
|
||||
ENGINE_register_all_complete();
|
||||
#endif
|
||||
|
||||
while (getopt_long(argc, argv, "", options, &ndx) != -1) {
|
||||
int c;
|
||||
while ((c = getopt_long(argc, argv, "", options, &ndx)) != -1) {
|
||||
if (c == '?')
|
||||
return usage(stderr);
|
||||
if (ndx == 0)
|
||||
digest = optarg ? optarg : "sha1";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user