diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-25 15:09:57 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-25 15:09:57 +0100 |
commit | 393aed62706745e2abde300844143b5d2a0c9041 (patch) | |
tree | 33da1c4e18796ccfe1ad3638228a1fde953e668c /lib/utils/images.js | |
parent | b240d6a8fcbab80ea35da8cee58576f674ea1821 (diff) | |
download | gitbook-393aed62706745e2abde300844143b5d2a0c9041.zip gitbook-393aed62706745e2abde300844143b5d2a0c9041.tar.gz gitbook-393aed62706745e2abde300844143b5d2a0c9041.tar.bz2 |
Improve error msg for ebook generation
Diffstat (limited to 'lib/utils/images.js')
-rw-r--r-- | lib/utils/images.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/utils/images.js b/lib/utils/images.js index 8169b06..44356a1 100644 --- a/lib/utils/images.js +++ b/lib/utils/images.js @@ -10,7 +10,12 @@ function convertSVGToPNG(source, dest, options) { return command.spawn('svgexport', [source, dest]) .fail(function(err) { - if (err.code == 'ENOENT') err = new Error('Need to install "svgexport" using "npm install svgexport -g"'); + if (err.code == 'ENOENT') { + error.RequireInstallError({ + cmd: 'svgexport', + install: 'Install it using: "npm install svgexport -g"' + }); + } throw err; }) .then(function() { |