Skip to content

Commit fc69d6d

Browse files
authored
Fix: target to use packageName rather than package on install (#197)
1 parent fabeabb commit fc69d6d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/integration/Target.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default class Target extends Plugin {
161161
const pluginTypeFolder = await this.getTypeFolder()
162162
if (this.isLocalSource) {
163163
await fs.ensureDir(path.resolve(this.cwd, 'src', pluginTypeFolder))
164-
const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.name)
164+
const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.packageName)
165165
await fs.rm(pluginPath, { recursive: true, force: true })
166166
await fs.copy(this.sourcePath, pluginPath, { recursive: true })
167167
const bowerJSON = await fs.readJSON(path.join(pluginPath, 'bower.json'))
@@ -177,7 +177,7 @@ export default class Target extends Plugin {
177177
const repoDetails = await this.getRepositoryUrl()
178178
if (!repoDetails) throw new Error('Error: Plugin repository url could not be found.')
179179
await fs.ensureDir(path.resolve(this.cwd, 'src', pluginTypeFolder))
180-
const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.name)
180+
const pluginPath = path.resolve(this.cwd, 'src', pluginTypeFolder, this.packageName)
181181
await fs.rm(pluginPath, { recursive: true, force: true })
182182
const url = repoDetails.url.replace(/^git:\/\//, 'https://')
183183
try {
@@ -206,7 +206,7 @@ export default class Target extends Plugin {
206206
}
207207
// bower install
208208
const outputPath = path.join(this.cwd, 'src', pluginTypeFolder)
209-
const pluginPath = path.join(outputPath, this.name)
209+
const pluginPath = path.join(outputPath, this.packageName)
210210
try {
211211
await fs.rm(pluginPath, { recursive: true, force: true })
212212
} catch (err) {

0 commit comments

Comments
 (0)