diff --git a/bin.js b/bin.js index 2f5cf80..2afc8c6 100755 --- a/bin.js +++ b/bin.js @@ -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 } ]) @@ -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() diff --git a/index.js b/index.js index 258fc55..d414765 100644 --- a/index.js +++ b/index.js @@ -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) }