Skip to content

Commit

Permalink
fix: fetcher call releaseFS (#112)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed May 25, 2024
1 parent ccbf734 commit 28b1f4b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,15 @@ export class BomBuilder {
cacheOptions: { skipIntegrityCheck: true }
}
return async function (pkg: Package): Promise<any> {
const { packageFs, prefixPath } = await fetcher.fetch(pkg, fetcherOptions)
const manifestPath = ppath.join(prefixPath, 'package.json')
return JSON.parse(await packageFs.readFilePromise(manifestPath, 'utf8'))
const { packageFs, prefixPath, releaseFs } = await fetcher.fetch(pkg, fetcherOptions)
try {
const manifestPath = ppath.join(prefixPath, 'package.json')
return JSON.parse(await packageFs.readFilePromise(manifestPath, 'utf8'))
} finally {
if (releaseFs !== undefined) {
releaseFs()
}
}
}
}

Expand Down

0 comments on commit 28b1f4b

Please sign in to comment.