diff --git a/ci/apps/tasks/open-charts-pr.sh b/ci/apps/tasks/open-charts-pr.sh index 4ff9ba2246..b363693234 100755 --- a/ci/apps/tasks/open-charts-pr.sh +++ b/ci/apps/tasks/open-charts-pr.sh @@ -40,7 +40,7 @@ for commit in $(git log --format="%H" ${old_ref}..${ref}); do changed_files=$(git diff-tree --no-commit-id --name-only -r $commit) for file in ${changed_files[@]}; do - if [[ " ${app_src_files[*]} " == *"$file"* ]]; then + if printf '%s\n' "${app_src_files[@]}" | grep -Fxq "$file"; then relevant_commits+=($commit) break fi diff --git a/ci/core/tasks/open-charts-pr.sh b/ci/core/tasks/open-charts-pr.sh index 4ff9ba2246..b363693234 100755 --- a/ci/core/tasks/open-charts-pr.sh +++ b/ci/core/tasks/open-charts-pr.sh @@ -40,7 +40,7 @@ for commit in $(git log --format="%H" ${old_ref}..${ref}); do changed_files=$(git diff-tree --no-commit-id --name-only -r $commit) for file in ${changed_files[@]}; do - if [[ " ${app_src_files[*]} " == *"$file"* ]]; then + if printf '%s\n' "${app_src_files[@]}" | grep -Fxq "$file"; then relevant_commits+=($commit) break fi diff --git a/ci/tasks/open-charts-pr.sh b/ci/tasks/open-charts-pr.sh index 90fda5dfe1..0dcbf47031 100755 --- a/ci/tasks/open-charts-pr.sh +++ b/ci/tasks/open-charts-pr.sh @@ -41,7 +41,7 @@ for commit in $(git log --format="%H" ${old_ref}..${ref}); do changed_files=$(git diff-tree --no-commit-id --name-only -r $commit) for file in ${changed_files[@]}; do - if [[ " ${app_src_files[*]} " == *"$file"* ]]; then + if printf '%s\n' "${app_src_files[@]}" | grep -Fxq "$file"; then relevant_commits+=($commit) break fi