mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-10-03 12:10:34 +00:00
Show log from ebook-convert in realtime for debugging
This commit is contained in:
+10
-3
@@ -102,9 +102,8 @@ Generator.prototype.finish = function() {
|
||||
].join(" ");
|
||||
|
||||
that.book.log.info("start conversion to", that.ebookFormat, "....");
|
||||
exec(command, function (error, stdout, stderr) {
|
||||
if (stdout) that.book.log.debug.ln(stdout);
|
||||
if (stderr) that.book.log.debug.ln(stderr);
|
||||
|
||||
var child = exec(command, function (error, stdout, stderr) {
|
||||
if (error) {
|
||||
that.book.log.info.fail();
|
||||
|
||||
@@ -120,6 +119,14 @@ Generator.prototype.finish = function() {
|
||||
d.resolve();
|
||||
});
|
||||
|
||||
child.stdout.on('data', function (data) {
|
||||
that.book.log.debug(data);
|
||||
});
|
||||
|
||||
child.stderr.on('data', function (data) {
|
||||
that.book.log.debug(data);
|
||||
});
|
||||
|
||||
return d.promise;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user