diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-05-21 15:15:50 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-05-21 15:15:50 +0000 |
commit | 151a7e11350a4157acb1a2a142fe30a2c1f5712e (patch) | |
tree | 153397e44ac6c808d21b2948169ed4f1f458901b /bin | |
parent | a408dc201879e70e6508f4269e031616739fc5a0 (diff) | |
download | src-test2-151a7e11350a4157acb1a2a142fe30a2c1f5712e.tar.gz src-test2-151a7e11350a4157acb1a2a142fe30a2c1f5712e.zip |
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
Notes
Notes:
svn path=/head/; revision=361332
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ls/ls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index edf4b49bf0e8..7378268867ef 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -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; |