Skip to content

Commit

Permalink
Add a missing potrace help message.
Browse files Browse the repository at this point in the history
See: #102
  • Loading branch information
lgarron committed Aug 11, 2023
1 parent e76b36f commit 5c9aaa5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,20 @@ function fontCssPipe() {

function bmp2svg() {
return through.obj(function(file, enc, next) {

var potraceProcess = child_process.spawn(
'potrace', ['-o', '-', '-b', 'svg'], {
stdio: [ 'pipe', 'pipe', 'inherit' ]
}
);
potraceProcess.on("error", () => {
console.error(`
Could not run \`potrace\`.
Please ensure that the \`potrace\` binary is available on your \`$PATH\`. For example, install using one of the following:
- apt install potrace (on Linux)
- brew install potrace (on macOS using Homebrew)
`)
});

potraceProcess.stdin.write(file.contents);
potraceProcess.stdin.end();
Expand Down

0 comments on commit 5c9aaa5

Please sign in to comment.