From f68aaf7ff954d6f680d757eb64af5edc9802c134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Mon, 26 May 2014 18:02:09 +0200 Subject: [PATCH] Fix cover option for ebook --- lib/generate/ebook/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/generate/ebook/index.js b/lib/generate/ebook/index.js index aaf4d35c8..1b8eb8b8b 100644 --- a/lib/generate/ebook/index.js +++ b/lib/generate/ebook/index.js @@ -29,14 +29,14 @@ Generator.prototype.finish = function() { .then(function() { var d = Q.defer(); - var _options = { - "--cover": that.options.cover - }; - if (!that.options.cover && fs.existsSync(path.join(that.options.output, "cover.jpg"))) { that.options.cover = path.join(that.options.output, "cover.jpg"); } + var _options = { + "--cover": that.options.cover + }; + var command = [ "ebook-convert", path.join(that.options.output, "index.html"), @@ -51,6 +51,8 @@ Generator.prototype.finish = function() { .join(" ") ].join(" "); + console.log(command); + exec(command, function (error, stdout, stderr) { if (error) { if (error.code == 127) {