* Prepend the managed bin directory to the system PATH.
()
| 152 | * Prepend the managed bin directory to the system PATH. |
| 153 | */ |
| 154 | function enhancePath(): void { |
| 155 | const binDir = getBinDir() |
| 156 | const currentPath = process.env.PATH || "" |
| 157 | |
| 158 | if (!currentPath.includes(binDir)) { |
| 159 | const separator = process.platform === "win32" ? ";" : ":" |
| 160 | process.env.PATH = `${binDir}${separator}${currentPath}` |
| 161 | logger.info("[Binaries] Prepended to PATH:", binDir) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | |
| 166 | // ============================================================================ |
no test coverage detected