The resolver exactly as install.ps1 ships it.
()
| 27 | |
| 28 | /** The resolver exactly as install.ps1 ships it. */ |
| 29 | function extractResolver(): string { |
| 30 | const text = fs.readFileSync(INSTALL_PS1, 'utf8').replace(/\r\n/g, '\n'); |
| 31 | const m = /# >>> Resolve-CodeGraphVersion\n([\s\S]*?)# <<< Resolve-CodeGraphVersion/.exec(text); |
| 32 | if (!m) throw new Error('install.ps1 has no Resolve-CodeGraphVersion block'); |
| 33 | return m[1]!; |
| 34 | } |
| 35 | |
| 36 | /** A PowerShell single-quoted string literal. */ |
| 37 | const psq = (s: string) => `'${s.replace(/'/g, "''")}'`; |