setEnvIfNotEmpty sets an environment variable only if the provided value is non-empty.
(key, value string)
| 72 | |
| 73 | // setEnvIfNotEmpty sets an environment variable only if the provided value is non-empty. |
| 74 | func setEnvIfNotEmpty(key, value string) { |
| 75 | if value != "" { |
| 76 | os.Setenv(key, value) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // AppendPythonBinDir appends the Python user "Scripts" directory to PATH if it exists. |
| 81 | func AppendPythonBinDir(userBaseDir string) { |