From 819c0ebf37e2883484b4ee09bd5bde74c46c680e Mon Sep 17 00:00:00 2001 From: Fly3949 Date: Tue, 4 Oct 2022 02:42:05 +0800 Subject: [PATCH] Fix infinite loop while find and sed --- deploy/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/entrypoint.sh b/deploy/entrypoint.sh index 627c75a5..2566cb05 100755 --- a/deploy/entrypoint.sh +++ b/deploy/entrypoint.sh @@ -48,9 +48,9 @@ fi cd $APP/dist if [ ! -z "$STATIC_CDN_HOST" ]; then - find . -name "*.*" -type f -exec sed -i "s/__STATIC_CDN_HOST__/\/$STATIC_CDN_HOST/g" {} \; + find . -name "*.*" -type f -print0 | xargs -0 sed -i "s/__STATIC_CDN_HOST__/\/$STATIC_CDN_HOST/g" else - find . -name "*.*" -type f -exec sed -i "s/__STATIC_CDN_HOST__\///g" {} \; + find . -name "*.*" -type f -print0 | xargs -0 sed -i "s/__STATIC_CDN_HOST__\///g" fi cd $APP