Skip to content

Commit

Permalink
feat(cli): ignite doctor: find locally installed plugins and display …
Browse files Browse the repository at this point in the history
…[Installed] if found (#1471 by @mikaoelitiana)
  • Loading branch information
mikaoelitiana authored and jamonholmgren committed Oct 11, 2019
1 parent 406871b commit 94be03c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/show-plugin-directory.ts
Expand Up @@ -10,9 +10,10 @@ import { IgniteToolbox } from '../types'
export default async function(toolbox: IgniteToolbox) {
const { pipe, keys, filter, map } = require('ramda')

const { print, parameters } = toolbox
const { print, parameters, runtime } = toolbox
const { colors, newline, info, table, error } = print
const directory = await fetchPluginRegistry(toolbox)
const plugins = runtime.plugins.map(p => p.name)
const search = parameters.first

const pluginTable = pipe(
Expand All @@ -23,7 +24,8 @@ export default async function(toolbox: IgniteToolbox) {
}),
map(k => {
const plugin = directory[k]
return [k, plugin.author]
const installed = plugins.includes(k)
return [k, plugin.author, installed ? '[Installed]' : '']
}),
)(directory)

Expand Down

0 comments on commit 94be03c

Please sign in to comment.