aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Ball <chris@printf.net>2015-05-28 14:17:37 +0000
committerChris Ball <chris@printf.net>2015-05-28 14:17:37 +0000
commit2dc46f57a736b238e65b46f7481f8d6c59aca175 (patch)
tree164bdc7e4a045302905da2656ab4df1599bfe197
parentbf8f6dc202b7b7398e78161b136c22eea1dd06b2 (diff)
Prettify mutable key JSON
-rwxr-xr-xgit-remote-gittorrent3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-remote-gittorrent b/git-remote-gittorrent
index a8bcb9d..2716953 100755
--- a/git-remote-gittorrent
+++ b/git-remote-gittorrent
@@ -5,6 +5,7 @@ var DHT = require('bittorrent-dht')
var exec = require('child_process').exec
var fs = require('fs')
var magnet = require('magnet-uri')
+var prettyjson = require('prettyjson')
var spawn = require('child_process').spawn
var Swarm = require('bittorrent-swarm')
var ut_gittorrent = require('ut_gittorrent')
@@ -35,7 +36,7 @@ if (matches) {
}
var json = res.v.toString()
var repos = JSON.parse(json)
- console.warn('\nMutable key ' + chalk.green(key) + ' returned:\n' + chalk.yellow(json))
+ console.warn('\nMutable key ' + chalk.green(key) + ' returned:\n' + prettyjson.render(repos, {keysColor: 'yellow'}))
get_infohash(repos.repositories[reponame].master)
})
})