From f686194f3038b69113b5e9d65912cd07116fc590 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 9 Apr 2021 17:19:50 -0400 Subject: [PATCH 1/2] FIX: Purge removed `--disable` flag from svgo call svgo 2.x dropped support for CLI plugin alteration. We could generate a JSON config with this option, but the changes are so miniscule we can likely just drop this flag. --- Dockerfile | 2 +- niworkflows/viz/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b46eb4acd07..2b2fa24cead 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,7 +100,7 @@ WORKDIR /home/niworkflows ENV HOME="/home/niworkflows" # Installing SVGO -RUN npm install -g svgo +RUN npm install -g svgo~2 # Installing WEBP tools RUN curl -sSLO "http://downloads.webmproject.org/releases/webp/libwebp-0.5.2-linux-x86-64.tar.gz" && \ diff --git a/niworkflows/viz/utils.py b/niworkflows/viz/utils.py index 921b9dfd082..7f1d6360ac5 100644 --- a/niworkflows/viz/utils.py +++ b/niworkflows/viz/utils.py @@ -44,7 +44,7 @@ def svg_compress(image, compress="auto"): # Compress the SVG file using SVGO if compress: - cmd = "svgo -i - -o - -q -p 3 --pretty --disable=cleanupNumericValues" + cmd = "svgo -i - -o - -q -p 3 --pretty" try: pout = subprocess.run( cmd, From 0366b107394de5c827b409e92c9aab3f07d1fa6d Mon Sep 17 00:00:00 2001 From: mathiasg Date: Sun, 11 Apr 2021 19:38:11 -0400 Subject: [PATCH 2/2] FIX: npm install syntax --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2b2fa24cead..55d7339ec78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,7 +100,7 @@ WORKDIR /home/niworkflows ENV HOME="/home/niworkflows" # Installing SVGO -RUN npm install -g svgo~2 +RUN npm install -g svgo@^2 # Installing WEBP tools RUN curl -sSLO "http://downloads.webmproject.org/releases/webp/libwebp-0.5.2-linux-x86-64.tar.gz" && \