(pythonPath: string)
| 283 | } |
| 284 | |
| 285 | async function getGlobalScriptsDir(pythonPath: string): Promise<string | null> { |
| 286 | const code = `import sysconfig; print(sysconfig.get_path('scripts'))`; |
| 287 | try { |
| 288 | const { stdout } = await execa(pythonPath, ['-c', code]); |
| 289 | const out = stdout.trim(); |
| 290 | return out || null; |
| 291 | } catch (err) { |
| 292 | debug('Failed to resolve Python global scripts directory', err); |
| 293 | return null; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | async function getUserScriptsDir(pythonPath: string): Promise<string | null> { |
| 298 | const code = |
no test coverage detected