Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-08-16 03:14:35 +0400
committerFeross Aboukhadijeh <feross@feross.org>2014-08-16 03:14:35 +0400
commit7064c8679595ad7457c2872400612db96cc36b70 (patch)
tree6977ee33343b0236d0b6682fd28b5383bc8080f2 /bin
parent795bffb2ede3e43a51d7f95e20fef9d66943dc51 (diff)
on crash, ask user to report bug
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index 04bd75a..1ebe421 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -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',
@@ -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)