Bug with Terminal and global environments

After restarting macOS opens Terminal app (which was opened before a restart). And Terminal ignores all custom global environments.

This bug exists in Big Sur and Catalina.

If close Terminal app and launch manually everything is OK.

I write custom global environments to environment.plist file which is placed in user's home folde > Library > LaunchAgents

and then loaded:

Code Block
launchctl load /Users/myprofilename/Library/LaunchAgents/environment.plist
launchctl start /Users/myprofilename/Library/LaunchAgents/environment.plist

I need custom global environments to set a variable to my working directory which is used in compilation scripts.

I would love to know whether this issue is related to the issue I created yesterday: https://developer.apple.com/forums/thread/710523

Bug with Terminal and global environments
 
 
Q