$HOME gets resolved as . (current directory)
I'm trying to set my session environment variables in KDE. You put in those files what you would normally put in ~/.profile or ~/.bash_profile, but KDE doesn't read those on login, so you need to put them under $HOME/.config/plasma-workspace/env/.
I have the following line in $HOME/.config/plasma-workspace/env/environment-variables.sh:
. "${HOME}/.bash_environment_variables"
and I have a file named .bash_environment_variables in my home directory. This script is executed correctly by KDE and my environment variables are indeed set on login, but shellcheck complains:
Not following: ./.bash_environment_variables: openBinaryFile: does not exist (No such file or directory)
It seems like shellcheck thinks that ${HOME} is .. Is this normal behavior?
It seems like shellcheck thinks that ${HOME} is .. Is this normal behavior?
in short; yes it is intentional.
You can use the source directive with additional files. https://github.com/koalaman/shellcheck/wiki/Directive#source
Is there a reason why it can't expand $HOME?