Skip to content

Commit

Permalink
add debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Flet committed Nov 20, 2017
1 parent 05917bf commit 5b8d715
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ function cli (args, stream, cb) {
abbr: 'h',
help: 'show help',
boolean: true
},
{
name: 'debug',
abbr: 'd',
help: 'show debug information',
boolean: true,
default: false
}
])

Expand Down Expand Up @@ -109,6 +116,7 @@ if (require.main === module) {
var code = 0
if (err) {
console.error(err.message)
console.error(err.stack)
code = -1
}
updateNotifier({pkg: pkg}).notify()
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function run (opts, stdout, cb) {
var parser

try {
bby = bestbuy({key: opts.key})
bby = bestbuy({key: opts.key, debug: opts.debug})
} catch (err) {
return cb(err)
}
Expand Down

0 comments on commit 5b8d715

Please sign in to comment.