From 09ab9a5f62c7662b76aaa8dd1d84dd3c8311a42a Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 3 Aug 2021 21:21:53 -0600 Subject: [PATCH] fix(entrypoint): change dart-sass cli options - oneshot: remove --update, re-compile of all files - watch: remove --stop-on-error - allow continuation after errors instead of container exit - display errors and allow for realtime correction --- Dockerfile | 6 +++--- entrypoint.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4de0e64..2490d06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,9 +54,9 @@ ENV TZ=Etc/UTC ENV SASS_STYLE=compressed # copy scripts and set permissions -COPY [ "entrypoint.sh", "/usr/local/bin/entrypoint.sh" ] -RUN chown root:root /usr/local/bin/entrypoint.sh \ - && chmod 755 /usr/local/bin/entrypoint.sh +COPY [ "entrypoint.sh", "/usr/local/bin/" ] +RUN chown root:root /usr/local/bin/*.sh \ + && chmod 755 /usr/local/bin/*.sh # switch to user account and run sass compiler USER sass diff --git a/entrypoint.sh b/entrypoint.sh index c5a5d83..d963025 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,11 +7,11 @@ if [ "$1" = "shell" ]; then exec /bin/bash elif [ "$1" = "oneshot" ]; then - exec /opt/dart-sass/sass -s "$SASS_STYLE" --update --stop-on-error /sass:/css + exec /opt/dart-sass/sass -s "$SASS_STYLE" --stop-on-error --embed-sources /sass:/css elif [ -n "$1" ]; then exec "$@" else - exec /opt/dart-sass/sass -s "$SASS_STYLE" --watch --poll /sass:/css + exec /opt/dart-sass/sass -s "$SASS_STYLE" --watch --poll --embed-sources /sass:/css fi exit $?