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

Commit

Permalink
fix: inspect log input
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 5, 2018
1 parent 94525eb commit 3de1e0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ export class Plugin implements IPlugin {
exit(code) {
throw new ExitError(code)
},
log(message) {
process.stdout.write((message || '') + '\n')
log(message: any = '') {
message = typeof message === 'string' ? message : inspect(message)
process.stdout.write(message + '\n')
},
error(message, options: {exit?: number} = {}) {
throw new CLIError(message, options)
Expand Down

0 comments on commit 3de1e0d

Please sign in to comment.