diff options
| author | Chris Ball <chris@printf.net> | 2015-05-28 14:17:37 +0000 |
|---|---|---|
| committer | Chris Ball <chris@printf.net> | 2015-05-28 14:17:37 +0000 |
| commit | 2dc46f57a736b238e65b46f7481f8d6c59aca175 (patch) | |
| tree | 164bdc7e4a045302905da2656ab4df1599bfe197 | |
| parent | bf8f6dc202b7b7398e78161b136c22eea1dd06b2 (diff) | |
Prettify mutable key JSON
| -rwxr-xr-x | git-remote-gittorrent | 3 |
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) }) }) |
