Keep user env variable when using sudo
January, 2021
Edit sudoers file or add new in /etc/sudoers.d
Defaults env_keep += "ENV_VAR"
note: save and close editor since visudo creates temp file and saves suders file only when you close editor