From fc69d6d90257c2f8b986490be263b02e1605f904 Mon Sep 17 00:00:00 2001 From: joe-allen-89 <85872286+joe-allen-89@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:10:13 +0100 Subject: [PATCH] Fix: target to use packageName rather than package on install (#197) --- lib/integration/Target.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/integration/Target.js b/lib/integration/Target.js index 1bea515..5bf271c 100644 --- a/lib/integration/Target.js +++ b/lib/integration/Target.js @@ -161,7 +161,7 @@ export default class Target extends Plugin { const pluginTypeFolder = await this.getTypeFolder() if (this.isLocalSource) { await fs.ensureDir(path.resolve(this.cwd, 'src', pluginTypeFolder)) - const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.name) + const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.packageName) await fs.rm(pluginPath, { recursive: true, force: true }) await fs.copy(this.sourcePath, pluginPath, { recursive: true }) const bowerJSON = await fs.readJSON(path.join(pluginPath, 'bower.json')) @@ -177,7 +177,7 @@ export default class Target extends Plugin { const repoDetails = await this.getRepositoryUrl() if (!repoDetails) throw new Error('Error: Plugin repository url could not be found.') await fs.ensureDir(path.resolve(this.cwd, 'src', pluginTypeFolder)) - const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.name) + const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.packageName) await fs.rm(pluginPath, { recursive: true, force: true }) const url = repoDetails.url.replace(/^git:\/\//, 'https://') try { @@ -206,7 +206,7 @@ export default class Target extends Plugin { } // bower install const outputPath = path.join(this.cwd, 'src', pluginTypeFolder) - const pluginPath = path.join(outputPath, this.name) + const pluginPath = path.join(outputPath, this.packageName) try { await fs.rm(pluginPath, { recursive: true, force: true }) } catch (err) {