From c3a45c49e2dcf292fd788447161a776c43939318 Mon Sep 17 00:00:00 2001 From: Asur Date: Wed, 27 Nov 2019 12:04:58 +0100 Subject: [PATCH] Avoid exiting if the optimize command fails --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index aeaaead..e4e8dca 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -19,6 +19,6 @@ function skip() { for file in $(find ${INPUT_ROOT} -name "*.html"); do [ -f "$file" ] || break print_info "Optimizing $file" - $GOPATH/bin/transform $file > /tmp/optimized.txt + ! $GOPATH/bin/transform $file > /tmp/optimized.txt [ -s /tmp/optimized.txt ] && cat /tmp/optimized.txt > $file || print_error "Not a valid AMP page. Omitting..." done \ No newline at end of file