Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

optimize-svg: Invoke svgo only via PNPM.

Niloth P7ada56c8e235
diff --git a/tools/setup/optimize-svg b/tools/setup/optimize-svg
index 899d876dd49..2dd1afda52c 100755
--- a/tools/setup/optimize-svg
+++ b/tools/setup/optimize-svg
@@ -45,7 +45,8 @@ ZULIP_PATH="$(readlink -f "$(dirname "$0")"/../..)"
PNPM="/usr/local/bin/pnpm"
if [ -n "$CHECK_UNOPTIMIZED" ]; then
- if [ "$(node_modules/.bin/svgo -f static/images/integrations/logos | grep -o '\.[0-9]% = ' | wc -l)" -ge 1 ]; then
+ RESULT=$("$PNPM" exec svgo -f static/images/integrations/logos | grep -o '\.[0-9]% = ' | wc -l)
+ if [ "$RESULT" -ge 1 ]; then
echo "ERROR: svgo detected unoptimized SVG files in the \`static/images/integrations/logos\` folder." 1>&2
echo "Please run tools/setup/optimize-svg and commit the file changes to optimize them."
exit 1