Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: target to use packageName rather than name on install (#196) #197

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading