Skip to content

Commit

Permalink
we should only inject sha if the root package allows top level
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwoo committed Aug 10, 2023
1 parent aabcd25 commit 879df0c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions report.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,12 @@ async function reportPostInstall () {
return Promise.reject(new Error('No parent found, nothing to report'))
}

const gitSha = await getGitSha()
logIfVerbose(`Injecting sha to parent: ${gitSha}`)
dependencyInfo.parent.gitSha = gitSha

if (allowTopLevel(dependencyInfo.rootPackage)) {
const gitSha = await getGitSha()
logIfVerbose(`Injecting sha to parent: ${gitSha}`)
dependencyInfo.parent.gitSha = gitSha
}

const rootPackage = dependencyInfo.rootPackage

Expand Down

0 comments on commit 879df0c

Please sign in to comment.