diff --git a/.build/helpers.mjs b/.build/helpers.mjs index 6f2c08bd1..0a0d3155d 100644 --- a/.build/helpers.mjs +++ b/.build/helpers.mjs @@ -553,6 +553,17 @@ export const getCompileOptions = () => { }; export const convertIconsToImages = async (dir, extension, size = 240) => { + const rsvgConvertAvailable = await new Promise((resolve) => { + exec('command -v rsvg-convert', (error) => { + resolve(!error); + }); + }); + + if (!rsvgConvertAvailable) { + console.log(`\nWarning: rsvg-convert not found. Skipping ${extension} conversion.`); + return; + } + const icons = getAllIcons(); await asyncForEach(Object.entries(icons), async function ([type, svgFiles]) {