diff --git a/src/lib/registry/helpers/find-packages-globs.ts b/src/lib/registry/helpers/find-packages-globs.ts index 83ad124..24263d7 100644 --- a/src/lib/registry/helpers/find-packages-globs.ts +++ b/src/lib/registry/helpers/find-packages-globs.ts @@ -20,10 +20,18 @@ export function findPackagesGlobs(workspaceRootDir: string) { switch (packageManager.name) { case "pnpm": { - const { packages: globs } = readTypedYamlSync<{ packages: string[] }>( + const workspaceConfig = readTypedYamlSync<{ packages: string[] }>( path.join(workspaceRootDir, "pnpm-workspace.yaml") ); + if (!workspaceConfig) { + throw new Error( + "pnpm-workspace.yaml file is empty. Please specify packages configuration." + ); + } + + const { packages: globs } = workspaceConfig; + log.debug("Detected pnpm packages globs:", inspectValue(globs)); return globs; }