From 5c9aaa576ef3adac6ce5879ed6c90139e06f6c42 Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Sat, 12 Aug 2023 08:31:51 +0900 Subject: [PATCH] Add a missing `potrace` help message. See: https://github.com/cubing/icons/issues/102 --- gulpfile.babel.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 4e3a7d9..71238a4 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -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();