Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2020 15:15:50 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361332 - head/bin/ls
Message-ID:  <202005211515.04LFFo3C062237@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu May 21 15:15:50 2020
New Revision: 361332
URL: https://svnweb.freebsd.org/changeset/base/361332

Log:
  ls: fix WITHOUT_LS_COLORS build
  
  *sigh* references to colorflags should be gated by COLORLS.
  
  Pointy hat to:	kevans
  Reported by:	jenkins (rescue build)
  X-MFC-With:	r361318

Modified:
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.c
==============================================================================
--- head/bin/ls/ls.c	Thu May 21 14:39:00 2020	(r361331)
+++ head/bin/ls/ls.c	Thu May 21 15:15:50 2020	(r361332)
@@ -270,8 +270,10 @@ main(int argc, char *argv[])
 	 * For historical compatibility, we'll use our autodetection if CLICOLOR
 	 * is set.
 	 */
+#ifdef COLORLS
 	if (getenv("CLICOLOR"))
 		colorflag = COLORFLAG_AUTO;
+#endif
 	while ((ch = getopt_long(argc, argv,
 	    "+1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,", long_opts,
 	    NULL)) != -1) {
@@ -355,7 +357,9 @@ main(int argc, char *argv[])
 			 * stdout isn't a tty.
 			 */
 			setenv("CLICOLOR", "", 1);
+#ifdef COLORLS
 			colorflag = COLORFLAG_AUTO;
+#endif
 			break;
 		case 'H':
 			fts_options |= FTS_COMFOLLOW;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005211515.04LFFo3C062237>