summaryrefslogtreecommitdiffstats
path: root/lib/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cli')
-rw-r--r--lib/cli/helper.js3
-rw-r--r--lib/cli/index.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/cli/helper.js b/lib/cli/helper.js
index 1086b4d..6dae58c 100644
--- a/lib/cli/helper.js
+++ b/lib/cli/helper.js
@@ -1,4 +1,5 @@
var _ = require('lodash');
+var path = require('path');
var Book = require('../book');
var NodeFS = require('../fs/node');
@@ -36,7 +37,7 @@ var FORMATS = {
// the root of the book is the first argument (or current directory)
function bookCmd(fn) {
return function(args, kwargs) {
- var input = args[0] || process.cwd();
+ var input = path.resolve(args[0] || process.cwd());
var book = new Book({
fs: new NodeFS(),
root: input,
diff --git a/lib/cli/index.js b/lib/cli/index.js
index 0492c29..07c4888 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -94,7 +94,7 @@ module.exports = {
helper.options.log
],
exec: function(args, kwargs) {
- var input = args[0] || process.cwd();
+ var input = path.resolve(args[0] || process.cwd());
var server = new Server();
// Init livereload server