Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: ensure plugins are set
Browse files Browse the repository at this point in the history
Fixes #45
  • Loading branch information
jdx committed Aug 27, 2018
1 parent 3d82d2d commit 1ed0eb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export class Config implements IConfig {
debug('reading user plugins pjson %s', userPJSONPath)
const pjson = this.userPJSON = await loadJSON(userPJSONPath)
if (!pjson.oclif) pjson.oclif = {schema: 1}
if (!pjson.oclif.plugins) pjson.oclif.plugins = []
await this.loadPlugins(userPJSONPath, 'user', pjson.oclif.plugins.filter((p: any) => p.type === 'user'))
await this.loadPlugins(userPJSONPath, 'link', pjson.oclif.plugins.filter((p: any) => p.type === 'link'))
} catch (err) {
Expand Down

0 comments on commit 1ed0eb2

Please sign in to comment.