Skip to content

Commit

Permalink
check right folder for new packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed May 25, 2024
1 parent a5fd556 commit 50c05da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ const main = async () => {
}
const loadRegistryPackageJson = (pkg: PkgMeta) => {
const filepath = packageJsonFilepath(pkg, 'registry')
if (!fs.existsSync(path.dirname(filepath))) {
if (!fs.existsSync(path.join(pkg.folder, 'registry'))) {
// it's ok for the package to not exist, maybe this is a new package. But the folder should exist so we know that there's been an attempt to pull it.
throw new Error(
`Registry package.json folder for ${filepath} doesn't exist yet. Has the "Pull registry packages" step run yet?`,
`Registry package.json folder for ${filepath} doesn't exist yet. Has the "Pulling \${pkg.name}" step run yet?`,
)
}

Expand Down

0 comments on commit 50c05da

Please sign in to comment.