AppendPythonBinDir adds the Python virtual environment bin directory to PATH.
(venvDir string)
| 56 | |
| 57 | // AppendPythonBinDir adds the Python virtual environment bin directory to PATH. |
| 58 | func AppendPythonBinDir(venvDir string) { |
| 59 | if venvDir == "" { |
| 60 | return |
| 61 | } |
| 62 | |
| 63 | binDir := filepath.Join(venvDir, "bin") |
| 64 | if fileio.PathExists(binDir) { |
| 65 | os.Setenv("PATH", env.JoinPaths("PATH", binDir)) |
| 66 | } |
| 67 | } |
no test coverage detected