diff options
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | lib/output/ebook.js | 5 | ||||
-rw-r--r-- | lib/utils/command.js | 2 |
3 files changed, 7 insertions, 6 deletions
@@ -30,6 +30,6 @@ build/Release # Output of documentation docs/_book -lib2 -test2 -theme2
\ No newline at end of file +book.pdf +book.epub +book.mobi diff --git a/lib/output/ebook.js b/lib/output/ebook.js index a74af41..228a025 100644 --- a/lib/output/ebook.js +++ b/lib/output/ebook.js @@ -113,8 +113,9 @@ EbookOutput.prototype.locateCover = function() { cover = this.resolve(cover); // Cover doesn't exist and multilingual? - if (!fs.existsSync(cover) && this.parent) { - return this.parent.locateCover(); + if (!fs.existsSync(cover)) { + if (this.parent) return this.parent.locateCover() + else return undefined; } return cover; diff --git a/lib/utils/command.js b/lib/utils/command.js index c1689cb..d2beba0 100644 --- a/lib/utils/command.js +++ b/lib/utils/command.js @@ -15,7 +15,7 @@ function exec(command, options) { var child = childProcess.exec(command, options, function(err, stdout, stderr) { if (!err) { - d.resolve(); + return d.resolve(); } err.message = stdout.toString('utf8') + stderr.toString('utf8'); |