diff --git a/packages/plugin-repo-cli/index.ts b/packages/plugin-repo-cli/index.ts index e9c87952a..965842a06 100644 --- a/packages/plugin-repo-cli/index.ts +++ b/packages/plugin-repo-cli/index.ts @@ -51,6 +51,8 @@ async function extractPluginFilesFromPackage(existingManifests: any, workDir: st const pluginDir = resolveRelativePathWithinDir(workDir, 'node_modules', packageName, 'publish'); + if (!(await fs.pathExists(pluginDir))) throw new Error(`Could not find publish directory at ${pluginDir}`); + const files = await fs.readdir(pluginDir); const manifestFilePath = path.resolve(pluginDir, files.find((f: any) => path.extname(f) === '.json')); const pluginFilePath = path.resolve(pluginDir, files.find((f: any) => path.extname(f) === '.jpl')); diff --git a/packages/tools/tool-utils.ts b/packages/tools/tool-utils.ts index 800a40f7d..11fa88eb5 100644 --- a/packages/tools/tool-utils.ts +++ b/packages/tools/tool-utils.ts @@ -147,7 +147,7 @@ export function execCommand(command: string, options: any = null): Promise