(packageRoot)
| 40 | } |
| 41 | |
| 42 | function readPackageJson(packageRoot) { |
| 43 | try { |
| 44 | const p = path.join(packageRoot, 'package.json') |
| 45 | return JSON.parse(fs.readFileSync(p, 'utf8')) |
| 46 | } catch { |
| 47 | return null |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | function run(cmd, args) { |
| 52 | const result = spawnSync(cmd, args, { |