From a97398fa01bcfb9736015462c43bf77dcceca981 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Sat, 21 Mar 2015 18:30:07 -0400 Subject: [PATCH] always output valid json --- bin/dogapi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dogapi b/bin/dogapi index 7020108..3489d1e 100755 --- a/bin/dogapi +++ b/bin/dogapi @@ -53,13 +53,13 @@ if(command === "now"){ if(subcommand){ dogapi[command].handleCli(subcommand, args, function(err, res){ if(err){ - console.error(err); + console.error(JSON.stringify(err, null, ' ')); process.exit(1); } else { if(res === ""){ res = "success"; } - console.log(res); + console.log(JSON.stringify(res, null, ' ')); } }); } else {