From 2dc46f57a736b238e65b46f7481f8d6c59aca175 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Thu, 28 May 2015 14:17:37 +0000 Subject: Prettify mutable key JSON --- git-remote-gittorrent | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) }) }) -- cgit v1.2.3