summaryrefslogtreecommitdiffstats
path: root/lib/cli/helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cli/helper.js')
-rw-r--r--lib/cli/helper.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/cli/helper.js b/lib/cli/helper.js
index e4dc8da..818fd0c 100644
--- a/lib/cli/helper.js
+++ b/lib/cli/helper.js
@@ -42,12 +42,13 @@ var FORMATS = {
function bookCmd(fn) {
return function(args, kwargs) {
var input = path.resolve(args[0] || process.cwd());
- return Book.setup(nodeFS, input, {
+ var book = new Book({
+ fs: nodeFS,
+ root: input,
logLevel: kwargs.log
- })
- .then(function(book) {
- return fn(book, args.slice(1), kwargs);
});
+
+ return fn(book, args.slice(1), kwargs);
};
}