[Bug 257886] ls: don't check color env variables if compiled with WITHOUT_LS_COLORS="YES"
Date: Thu, 19 Aug 2021 19:24:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257886 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ced2dcadccfcff8f7991b3cb5f6f70d6710eadfb commit ced2dcadccfcff8f7991b3cb5f6f70d6710eadfb Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org> AuthorDate: 2021-08-18 20:47:37 +0000 Commit: Piotr Pawel Stefaniak <pstef@FreeBSD.org> CommitDate: 2021-08-19 19:22:16 +0000 ls: prevent no-color build from complaining when COLORTERM is non-empty As 257886 reports, if ls(1) is built with WITHOUT_LS_COLORS="YES", it issues a warning whenever COLORTERM is non-empty. The warning is not useful, so I thought to remove it, but as Ed pointed out, we may want to have a way to determine whether a particular copy of ls has been compiled with color support or not. Therefore move the warnx() call to the getopt loop in a WITHOUT_LS_COLORS build to fire when the user asks for colored output. PR: 257886 Reported by: Marko Turk Reviewed by: kevans bin/ls/ls.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.