Skip to content

Commit

Permalink
fix(command): hide local path on 'list' when factory is local link
Browse files Browse the repository at this point in the history
  • Loading branch information
neikvon committed Dec 17, 2020
1 parent b022cf8 commit f81c8f0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/commands/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ export default class CommandList extends Command {
: `https://www.npmjs.com/package/${factory.id}`
const local = factory.options?.rootDir

let txt = `\n${index} ${title}${version}`
txt +=`
${this.style.dim`Remote path: ${from}`}
${this.style.dim`Local path: ${local}`}
`
let txt = `\n${index} ${title}${version}
${this.style.dim`From: ${from}`}`

if (local) {
txt += `
${this.style.dim`Local: ${local}`}`
}

if (factory.description) {
txt += '\n\n ' + factory.description
Expand Down

0 comments on commit f81c8f0

Please sign in to comment.