« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/gen-thumbs.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/gen-thumbs.js')
-rw-r--r--src/gen-thumbs.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gen-thumbs.js b/src/gen-thumbs.js
index e99b960..3d441bc 100644
--- a/src/gen-thumbs.js
+++ b/src/gen-thumbs.js
@@ -251,7 +251,11 @@ async function getImageMagickVersion(binary) {
     allData += data.toString();
   });
 
-  await promisifyProcess(proc, false);
+  try {
+    await promisifyProcess(proc, false);
+  } catch (error) {
+    return null;
+  }
 
   if (!allData.match(/ImageMagick/i)) {
     return null;
@@ -283,7 +287,7 @@ async function getSpawnMagick(tool) {
   }
 
   if (fn === null && await commandExists('magick')) {
-    version = await getImageMagickVersion(fn);
+    version = await getImageMagickVersion('magick');
     if (version !== null) {
       fn = (args) => spawn('magick', [tool, ...args]);
       description = `magick ${tool}`;