Package: devscripts
Version: 2.26.9
Severity: minor

    #!/bin/sh
    command -v -- "$prg"

Actual output (checkbashisms 2.26.9, exit 1):

    possible bashism in test.sh line 2 ('command' with option other
than -p, -v or -V):
    command -v -- "$prg"

Expected: no output. "--" is the standard end-of-options marker
(POSIX XCU 12.2, Guideline 10), not an option to command; the
operand after it is the utility name, which is exactly why the
idiom is used before a possibly dash-leading name. dash accepts
the line. The related option-parsing issue #835498 was fixed in
2.20.3, but a bare -- is still misread as an option in 2.26.9.

Found downstream (openSUSE/rpmlint corpus): ~30 instances, in the
hdf5 wrapper family and elsewhere.

Disclosure, encouraged by GR 2026-002: this report was drafted with
AI assistance; the reproducer was verified by me against
checkbashisms 2.26.9.

Reply via email to