mirror of
https://github.com/coreutils/coreutils.git
synced 2026-10-28 09:44:34 +08:00
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.
This commit is contained in:
1 parent
479317e6ce
commit
aad192543e
1 file changed
+1
-2
+1
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user