(stderr: string)
| 100 | * driven so callers only show apt guidance when it actually applies. |
| 101 | */ |
| 102 | export function isMissingVenvModuleError(stderr: string): boolean { |
| 103 | if (!stderr) return false; |
| 104 | return ( |
| 105 | /ensurepip/i.test(stderr) || |
| 106 | /No module named ['"]?venv/i.test(stderr) || |
| 107 | /python3?-venv/i.test(stderr) || |
| 108 | // `python3 -m venv` on Debian prints this when ensurepip is unavailable. |
| 109 | /returned non-zero exit status 1.*ensurepip/i.test(stderr) || |
| 110 | /The virtual environment was not created successfully/i.test(stderr) |
| 111 | ); |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Builds an actionable, OS-specific install hint for the missing venv module. |
no outgoing calls
no test coverage detected