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
This commit is contained in:
parent
a408dc2018
commit
151a7e1135
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361332
@ -270,8 +270,10 @@ main(int argc, char *argv[])
|
|||||||
* For historical compatibility, we'll use our autodetection if CLICOLOR
|
* For historical compatibility, we'll use our autodetection if CLICOLOR
|
||||||
* is set.
|
* is set.
|
||||||
*/
|
*/
|
||||||
|
#ifdef COLORLS
|
||||||
if (getenv("CLICOLOR"))
|
if (getenv("CLICOLOR"))
|
||||||
colorflag = COLORFLAG_AUTO;
|
colorflag = COLORFLAG_AUTO;
|
||||||
|
#endif
|
||||||
while ((ch = getopt_long(argc, argv,
|
while ((ch = getopt_long(argc, argv,
|
||||||
"+1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,", long_opts,
|
"+1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,", long_opts,
|
||||||
NULL)) != -1) {
|
NULL)) != -1) {
|
||||||
@ -355,7 +357,9 @@ main(int argc, char *argv[])
|
|||||||
* stdout isn't a tty.
|
* stdout isn't a tty.
|
||||||
*/
|
*/
|
||||||
setenv("CLICOLOR", "", 1);
|
setenv("CLICOLOR", "", 1);
|
||||||
|
#ifdef COLORLS
|
||||||
colorflag = COLORFLAG_AUTO;
|
colorflag = COLORFLAG_AUTO;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'H':
|
case 'H':
|
||||||
fts_options |= FTS_COMFOLLOW;
|
fts_options |= FTS_COMFOLLOW;
|
||||||
|
Loading…
Reference in New Issue
Block a user