Skip to content

Commit

Permalink
feat(bin): strips out -- fromk logged command when no arguments are p…
Browse files Browse the repository at this point in the history
…assed after it
  • Loading branch information
rafamel committed May 5, 2019
1 parent 575e337 commit 3df0061
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bin/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ export default async function main(argv: string[]): Promise<void> {

// Log full command to be run w/ resolved scopes
const scopes = await core.scopes();
const plain = join(cmd._);
logger.info(
chalk.bold('kpo') +
(scopes.length ? chalk.bold.yellow(' @' + scopes.join(' @')) : '') +
`${chalk.bold.blue(' ' + first)} ${join(cmd._)}`
chalk.bold.blue(' ' + first + ' ') +
(plain.slice(-3) === ' --' ? plain.slice(0, -3) : plain)
);

switch (first) {
Expand Down

0 comments on commit 3df0061

Please sign in to comment.