(output)
| 96 | } |
| 97 | |
| 98 | function parsePythonVersion (output) { |
| 99 | const versionRegex = /^Python (?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/m.exec(output.trim()) |
| 100 | |
| 101 | if (versionRegex === null) { |
| 102 | return null |
| 103 | } |
| 104 | |
| 105 | const { major, minor, patch } = versionRegex.groups |
| 106 | return { major: Number(major), minor: Number(minor), patch: Number(patch) } |
| 107 | } |
| 108 | |
| 109 | async function getPythonInfo () { |
| 110 | pythonInfoPromise ??= (async () => { |