Skip to content

Commit

Permalink
Fix: target to use packageName rather than package on install (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-allen-89 committed Oct 3, 2023
1 parent fabeabb commit fc69d6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/integration/Target.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand All @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit fc69d6d

Please sign in to comment.