← back to CelebritySignatures
wear: use 'convert' not 'magick' — prod box only has ImageMagick 6 (TK-10286)
f2976c079cc24ac6bd941ac81d148339ba6fffa3 · 2026-09-09 07:30:23 -0700 · Steve Abrams
Caught right after deploying 9f1ba52: SSH'd into Kamatera to verify the
black-print recolor fix would actually work there, and 'which magick' came
back empty — only 'convert' (ImageMagick 6) is installed. My local dev
machine has IMv7's 'magick' unified CLI, which made the gap invisible until
checked. Would have failed open (the try/catch falls back to the original
unrecolored image) rather than crash anything, but the actual fix wouldn't
have worked in production — worth catching before it needed a real dark-
garment order to surface.
Switched both call sites (server.js, reconcile-wear-orders.mjs) to spawn
'convert' instead — verified present and working with identical output on
both this Mac and Kamatera (same recolor command, same result, 'convert' is
just deprecated-but-functional under IMv7 too, only a stderr warning).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmxcNKtFg77wP47uZq5Zsm
Files touched
M scripts/reconcile-wear-orders.mjsM server.js
Diff
commit f2976c079cc24ac6bd941ac81d148339ba6fffa3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Sep 9 07:30:23 2026 -0700
wear: use 'convert' not 'magick' — prod box only has ImageMagick 6 (TK-10286)
Caught right after deploying 9f1ba52: SSH'd into Kamatera to verify the
black-print recolor fix would actually work there, and 'which magick' came
back empty — only 'convert' (ImageMagick 6) is installed. My local dev
machine has IMv7's 'magick' unified CLI, which made the gap invisible until
checked. Would have failed open (the try/catch falls back to the original
unrecolored image) rather than crash anything, but the actual fix wouldn't
have worked in production — worth catching before it needed a real dark-
garment order to surface.
Switched both call sites (server.js, reconcile-wear-orders.mjs) to spawn
'convert' instead — verified present and working with identical output on
both this Mac and Kamatera (same recolor command, same result, 'convert' is
just deprecated-but-functional under IMv7 too, only a stderr warning).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmxcNKtFg77wP47uZq5Zsm
---
scripts/reconcile-wear-orders.mjs | 4 +++-
server.js | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/scripts/reconcile-wear-orders.mjs b/scripts/reconcile-wear-orders.mjs
index d2e73b1..75f1500 100644
--- a/scripts/reconcile-wear-orders.mjs
+++ b/scripts/reconcile-wear-orders.mjs
@@ -87,7 +87,9 @@ async function recolorSignatureToLight(imageUrl) {
if (!src.ok) throw new Error(`fetch ${src.status}`);
const buf = Buffer.from(await src.arrayBuffer());
const out = await new Promise((resolve, reject) => {
- const proc = spawn('magick', ['-background', 'none', '-', '-channel', 'RGB', '-fill', '#f5f3ee', '-colorize', '100%', 'png:-']);
+ // 'convert' not 'magick': the Kamatera prod box only has ImageMagick 6
+ // (convert), not the IMv7 'magick' unified CLI — verified via SSH.
+ const proc = spawn('convert', ['-background', 'none', '-', '-channel', 'RGB', '-fill', '#f5f3ee', '-colorize', '100%', 'png:-']);
const chunks = []; let errText = '';
const timer = setTimeout(() => { proc.kill(); reject(new Error('magick timeout')); }, 8000);
proc.stdout.on('data', c => chunks.push(c));
diff --git a/server.js b/server.js
index dd8e1c2..2b22836 100644
--- a/server.js
+++ b/server.js
@@ -247,7 +247,11 @@ async function recolorSignatureToLight(imageUrl) {
if (!src.ok) throw new Error(`fetch ${src.status}`);
const buf = Buffer.from(await src.arrayBuffer());
const out = await new Promise((resolve, reject) => {
- const proc = spawn('magick', ['-background', 'none', '-', '-channel', 'RGB', '-fill', '#f5f3ee', '-colorize', '100%', 'png:-']);
+ // 'convert' not 'magick': the Kamatera prod box only has ImageMagick 6
+ // (convert), not the IMv7 'magick' unified CLI — verified via SSH.
+ // 'convert' also exists on Mac2 (IMv7's back-compat shim, just prints a
+ // deprecation warning to stderr, which this doesn't treat as failure).
+ const proc = spawn('convert', ['-background', 'none', '-', '-channel', 'RGB', '-fill', '#f5f3ee', '-colorize', '100%', 'png:-']);
const chunks = []; let errText = '';
const timer = setTimeout(() => { proc.kill(); reject(new Error('magick timeout')); }, 8000);
proc.stdout.on('data', c => chunks.push(c));
← 452cc4c wear: update stale KNOWN ISSUE notes now that the black-prin
·
back to CelebritySignatures
·
wear: independent Stripe live switch — allows one test order c2a79ec →