From aad192543e7f9d50e808ee583c4c14111d469d4c Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 22 Oct 2026 21:24:19 -0700 Subject: [PATCH] doc: dircolors: don't assume the shell starts in $HOME * doc/coreutils.texi (dircolors invocation): Use an absolute path when checking whether a user's .dircolors file exists in $HOME and when loading it. Don't define a variable. Discovered by Anthropic's OSS Scanner, as bug ANT-2026-HB2T3LWR. --- doc/coreutils.texi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index a916b9cf3..cb1f9ee6c 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -8621,8 +8621,7 @@ exists, you can put the following lines in your @file{~/.bashrc} (or adapt them to your favorite shell): @example -d=.dircolors -test -r $d && eval "$(dircolors $d)" +test -r ~/.dircolors && eval "$(dircolors ~/.dircolors)" @end example @vindex LS_COLORS