()
| 229 | } |
| 230 | |
| 231 | export function defaultRemoveDeps(): RemoveBinaryDeps { |
| 232 | return { |
| 233 | platform: process.platform, |
| 234 | execPath: process.execPath, |
| 235 | rm: (p) => fs.rmSync(p, { recursive: true, force: true }), |
| 236 | rename: (from, to) => fs.renameSync(from, to), |
| 237 | run: (cmd, args) => { |
| 238 | const res = spawnSync(cmd, args, { stdio: 'inherit', windowsHide: true, timeout: 120_000 }); |
| 239 | return typeof res.status === 'number' ? res.status : -1; |
| 240 | }, |
| 241 | }; |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Rename the running (locked) node.exe out of `dir` so the rest of the tree |
no outgoing calls
no test coverage detected