Discover where a Environment Variable is set
Just open a bash terminal and enter this command:
PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7> log.txt
Then see te log
...