Skip to content

Commit

Permalink
on crash, ask user to report bug
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Aug 15, 2014
1 parent 795bffb commit 7064c86
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ var numeral = require('numeral')
var path = require('path')
var WebTorrent = require('../')

process.on('exit', function (code) {
if (code !== 0) {
clivas.line('{red:ERROR:} If you think this is a bug in webtorrent, report it!')
console.log('=====> <=====')
console.log('=====> https://github.com/feross/webtorrent/issues <=====')
console.log('=====> <=====')
}
})

var argv = minimist(process.argv.slice(2), {
alias: {
p: 'port',
Expand Down Expand Up @@ -58,7 +67,7 @@ if (argv.help || !torrentId) {
Download the torrent, given as:
* magnet uri (string)
* magnet uri
* http/https url to .torrent file
* filesystem path to .torrent file
* info hash (as hex string)
Expand Down

0 comments on commit 7064c86

Please sign in to comment.