Browse Source

always output valid json

pull/14/head
Brett Langdon 11 years ago
parent
commit
a97398fa01
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      bin/dogapi

+ 2
- 2
bin/dogapi View File

@ -53,13 +53,13 @@ if(command === "now"){
if(subcommand){ if(subcommand){
dogapi[command].handleCli(subcommand, args, function(err, res){ dogapi[command].handleCli(subcommand, args, function(err, res){
if(err){ if(err){
console.error(err);
console.error(JSON.stringify(err, null, ' '));
process.exit(1); process.exit(1);
} else { } else {
if(res === ""){ if(res === ""){
res = "success"; res = "success";
} }
console.log(res);
console.log(JSON.stringify(res, null, ' '));
} }
}); });
} else { } else {


Loading…
Cancel
Save