env_reset If set, sudo will reset the environment to only contain the LOGNAME, SHELL, USER, USERNAME and the SUDO_* variables. Any variables in the caller’s environment that match the `env_keep` and `env_check` lists are then added. The default contents of the `env_keep` and `env_check` lists are displayed when sudo is run by root with the -V option. If the secure_path option is set, its value will be used for the PATH environment variable. This flag is on by default.
解決方法
最簡單的方法加上-E, 將 User 的環境變數先載入
1 2 3 4
The -E (preserve environment) option indicates to the security policy that the user wishes to preserve their existing environment variables. The security policy may return an error if the -E option is specified and the user does not have permission to preserve the environment.