diff --git a/scripts/test-mods b/scripts/test-mods index cc120286f9..af7d074302 100755 --- a/scripts/test-mods +++ b/scripts/test-mods @@ -1,7 +1,7 @@ #!/bin/bash set -e -x -res=$(go mod edit --json | jq '.Replace[] | select(.Old.Path | contains("k8s.io/")) | .New.Path' | grep -v k3s-io | wc -l) +res=$(go mod edit --json | jq -r '.Replace[] | select(.Old.Path | contains("k8s.io/")) | .New.Path' | grep -vE '^(k8s.io/|github.com/k3s-io/)' | wc -l) if [ $res -gt 0 ];then echo "Incorrect kubernetes replacement fork in go.mod" exit 1