(dataDir?: string)
| 137 | * Falls back to system `python3` when the venv has not been created yet. |
| 138 | */ |
| 139 | export function getPythonBin(dataDir?: string): string { |
| 140 | const dir = dataDir ?? getConfig().dataDir; |
| 141 | if (!dir) return 'python3'; |
| 142 | const venvPython = venvBinPath(dir, 'python'); |
| 143 | return existsSync(venvPython) ? venvPython : 'python3'; |
| 144 | } |
no test coverage detected