[Bug 266264] file(1): incorrect output when file name is read from standard input

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 07 Sep 2022 05:51:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266264

            Bug ID: 266264
           Summary: file(1): incorrect output when file name is read from
                    standard input
           Product: Base System
           Version: 13.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

This command produces incorrect output on 13-STABLE:
> $ echo /bin/ls | file -f -
> /:       ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.1 (1301506), FreeBSD-style, stripped

The correct output is:
> $ echo /bin/ls | file -f -
> /bin/ls:       ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.1 (1301506), FreeBSD-style, stripped


I found this while investigating why doesn't 'make stage-qa' print dependency
recommendations for ports, and narrowed it to this problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.