You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Plugin Repo: Improved error message when plugin "publish" directory is missing
This commit is contained in:
		| @@ -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')); | ||||
|   | ||||
| @@ -147,7 +147,7 @@ export function execCommand(command: string, options: any = null): Promise<strin | ||||
| 	}); | ||||
| } | ||||
|  | ||||
| export function resolveRelativePathWithinDir(baseDir: string, ...relativePath: string[]) { | ||||
| export function resolveRelativePathWithinDir(baseDir: string, ...relativePath: string[]): string { | ||||
| 	const path = require('path'); | ||||
| 	const resolvedBaseDir = path.resolve(baseDir); | ||||
| 	const resolvedPath = path.resolve(baseDir, ...relativePath); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user