From e76413a1b0fc3540e13d334ff3ab1799c014a4ac Mon Sep 17 00:00:00 2001 From: John Le Drew Date: Mon, 24 Nov 2014 12:18:10 +0000 Subject: [PATCH] List CLI command output current data. Make list command output the correct list of dbs on the server (also removed the help / guidance messages so it just outputs a plain list I can pipe into grep easily) --- lib/cli/commands/db.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/cli/commands/db.js b/lib/cli/commands/db.js index 4822f1f..882f829 100644 --- a/lib/cli/commands/db.js +++ b/lib/cli/commands/db.js @@ -23,11 +23,10 @@ exports.create = function (name, type, storage) { * List the databases on the server. */ exports.list = function () { - console.log('The following databases exist on the server:'); return this.server.list() .then(function (dbs) { - Object.keys(dbs).forEach(function (name) { - console.log('\t\t' + name); + dbs.forEach(function (db) { + console.log(db.name); }); }); };