mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-25 03:42:30 +00:00
Don't pass cover to ebook-convert if non existant
This commit is contained in:
+3
-3
@@ -30,6 +30,6 @@ build/Release
|
||||
# Output of documentation
|
||||
docs/_book
|
||||
|
||||
lib2
|
||||
test2
|
||||
theme2
|
||||
book.pdf
|
||||
book.epub
|
||||
book.mobi
|
||||
|
||||
+3
-2
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user