diff --git a/hack/update-go-mod/update-majors.sh b/hack/update-go-mod/update-majors.sh index ae984668f..7e0038dc5 100755 --- a/hack/update-go-mod/update-majors.sh +++ b/hack/update-go-mod/update-majors.sh @@ -36,7 +36,7 @@ for m in $modules; do found_new_version=$? if [[ $found_new_version == 0 ]]; then echo "Found new version $next_version. Replacing imports..." - find . -name './.*' -prune -o \ + find . -wholename './.*' -prune -o \ -path ./generated -prune -o \ -type f -name '*.go' -print0 | xargs -0 sed -i '' "s#${m}#${next_version}#g"