(source, target)
| 144 | } |
| 145 | |
| 146 | function copyBinary(source, target) { |
| 147 | if (!fs.existsSync(source)) throw new Error(`Binary not found at ${source}`) |
| 148 | fs.mkdirSync(path.dirname(target), { recursive: true }) |
| 149 | if (fs.existsSync(target)) fs.unlinkSync(target) |
| 150 | try { |
| 151 | fs.linkSync(source, target) |
| 152 | } catch { |
| 153 | fs.copyFileSync(source, target) |
| 154 | } |
| 155 | fs.chmodSync(target, 0o755) |
| 156 | } |
| 157 | |
| 158 | function verifyBinary() { |
| 159 | const result = childProcess.spawnSync(targetBinary, ["--version"], { |
no outgoing calls
no test coverage detected