(callback: (path: string) => void)
| 28 | ) |
| 29 | |
| 30 | function findYarnVersion(callback: (path: string) => void) { |
| 31 | glob('vendor/yarn-*.js', (error, files) => { |
| 32 | if (error != null) { |
| 33 | throw error |
| 34 | } |
| 35 | |
| 36 | // this ensures the paths returned by glob are sorted alphabetically |
| 37 | files.sort() |
| 38 | |
| 39 | // use the latest version here if multiple are found |
| 40 | callback(forceUnwrap('Missing vendored yarn', files.at(-1))) |
| 41 | }) |
| 42 | } |
| 43 | |
| 44 | findYarnVersion(path => { |
| 45 | let result = spawnSync( |
no test coverage detected