[bug #63949] find -inum (without argument) print worng error message

James Youngman <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #1, bug #63949 (project findutils):

This is already fixed in git, but the change post-dates findutils 4.9.0.

commit 4a7280927285dbcf0ac815aa3aecc65b144e3fa4
Author: Bernhard Voelker <[email protected]>
Date:   Wed Jan 4 20:14:01 2023 +0100

    find: fix error diagnostics of options with mandatory, numeric arguments
    
    The error diagnostic for wrong invocations with option that require
    numeric arguments (-inum, -links, -gid, -uid) was wrong and not helpful:
      $ find -gid
      find: invalid argument `-gid' to `-gid'
    
    * find/parser.c (parse_gid): Remove changing back of the ARG_PTR in
    the error case; thus simplify.
    (parse_inum,parse_links,parse_uid): Likewise.
    (get_num): While at it, mention -gid and -uid in the comment as well.
    (insert_num): Also improve the error diagnostic in the case the user
    has provided a non-numeric argument.  Previously, it was just "invalid
    argument".
    * tests/find/opt-numeric-arg.sh: Add test.
    * tests/local.mk: Reference it.
    * NEWS (Bug Fixes): Mention the fix.
    
    Reported by Andreas Schwab <[email protected]> in
    <https://lists.gnu.org/r/bug-findutils/2023-01/msg00001.html>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63949>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.