Skip to content

Commit 5ea497e

Browse files
committed
why will this not work
1 parent b0f8029 commit 5ea497e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/plugins.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,14 @@ export default class Plugins {
216216
}
217217
} else {
218218
// npm
219+
console.log(`L219`)
219220
const range = validRange(tag)
220221
const unfriendly = this.unfriendlyName(name)
221222
if (unfriendly && (await this.npmHasPackage(unfriendly))) {
222223
name = unfriendly
223224
}
224225

226+
console.log(`L226`)
225227
// validate that the package name exists in the npm registry before installing
226228
await this.npmHasPackage(name, true)
227229

@@ -234,16 +236,17 @@ export default class Plugins {
234236
root: join(this.config.dataDir, 'node_modules', name),
235237
userPlugins: false,
236238
})
239+
console.log(`L239`)
237240
this.debug(`finished loading plugin ${name} at root ${plugin.root}`)
238241
notifyUser(plugin, output)
239242
this.isValidPlugin(plugin)
240-
243+
console.log(`L243`)
241244
await this.add({name, tag: range ?? tag, type: 'user'})
242245
}
243246

247+
console.log(`L246`)
244248
await rm(join(this.config.dataDir, 'yarn.lock'), {force: true})
245-
246-
console.log(`package.json is ${await readFile(this.pjsonPath, 'utf8')}`)
249+
console.log(`L248`)
247250
return plugin
248251
} catch (error: unknown) {
249252
this.debug('error installing plugin:', error)

0 commit comments

Comments
 (0)