Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getPkg (cache, scope, pkgName) {
const key = depKey(pkgName, scope.dependencies[pkgName])
if (pkgCache.has(key)) {
return pkgCache.get(key)
} else {
const tink = process.tink
process.tink = null
try {
const { metadata } = ccGet.sync(cache, key)
const ret = JSON.parse(metadata)
pkgCache.set(key, ret)
return ret
} finally {
process.tink = tink
}
}
}