profile.d/toolbox.sh doesn't take into account TERMINFO_DIRS
Describe the bug
TERMINFO_DIRS is another way to inform tools like tput(1) of terminfo(5) entries. Because the script doesn't take it into account, you get an error on startup like Error: terminfo entry not found for xterm-ghostty.
Steps how to reproduce the behaviour
- Store a terminfo entry in a non-default directory, like
$XDG_DATA_HOME/terminfo - Enter a toolbox container
Expected behaviour
The script should read TERMINFO_DIRS.
Actual behaviour
TERMINFO_DIRS is not read.
Output of toolbox --version (v0.0.90+)
Current main branch at time of writing. See: https://github.com/containers/toolbox/blob/cb6eee85ef88a0dc8694707d29737f61fa0ac330/profile.d/toolbox.sh#L86-L101
openssl is the container. gonk is the host.
Although I guess this script is source before my bashrc where I set the relevant environment variables. Hmm. Interested to hear the thoughts of others.
Looks like it's deliberate, but honestly I'm not sure what the point of this error message is? It should be pretty obvious if you're missing the terminfo entry. If the code is knowingly not checking this properly then it would probably be better to just remove the check.
I see it was introduced due to some confusion but I guess my feeling is that now it's just confusing me instead. I've set TERMINFO_DIRS and it works, but this message is telling me it's not. So I had to come here to find out why and I just have a misleading error message that I can't get rid of.