Skip to content

Commit

Permalink
add some notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Forster committed Aug 3, 2018
1 parent 2381d5f commit 49b1f14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script/post-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ const options: SpawnSyncOptions = {
}

function findYarnVersion(callback: (path: string) => void) {
glob('vendor/yarn-*.js', options, (error, files) => {
glob('vendor/yarn-*.js', (error, files) => {
if (error != null) {
throw error
}

// this ensures the paths returned by glob are sorted alphabetically
files.sort()

const foundVersion = files[files.length - 1]
// use the latest version here if multiple are found
const latestVersion = files[files.length - 1]

callback(foundVersion)
callback(latestVersion)
})
}

Expand Down

0 comments on commit 49b1f14

Please sign in to comment.