You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(BASH_COMPLETION_USER_FILE): explicitly check if it is not /dev/null
Users often set `BASH_COMPLETION_USER_FILE=/dev/null' to explicitly
express that there is no user configuration file. However, in broken
systems, /dev/null may be a regular file that contains random outputs
from arbitary commands whose outputs are discarded. We shall
explicitly confirm that the path is not `/dev/null' before sourcing
because we do not want to source this unexpected `/dev/null' file.
In fact, this caused a problem in the CI testing on GitHub [1] where
the command history is output to `HISTFILE=/dev/null'. Here,
`/dev/null' gets the history entry `source bash_completion' and then
sourced from `bash_completion' itself, which results in an infinite
source chain of `bash_completion' -> `/dev/null' -> `bash_completion'
-> `/dev/null' -> ... while invoking random commands from the command
history.
[1] scop#529
0 commit comments