Skip to content

Commit 312c8cc

Browse files
authored
Merge pull request kubernetes#76149 from liggitt/pin-fixup
Make pin-dependency.sh work with things other than docker
2 parents d18dae5 + 892ad8b commit 312c8cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/pin-dependency.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ fi
5656

5757
# Add the require directive
5858
echo "Running: go get ${dep}@${sha}"
59-
go get "${dep}@${sha}"
59+
go get -d "${dep}@${sha}"
6060

6161
# Find the resolved version
62-
rev=$(go mod edit -json | jq -r '.Require[] | select(.Path == "github.com/docker/docker") | .Version')
62+
rev=$(go mod edit -json | jq -r ".Require[] | select(.Path == \"${dep}\") | .Version")
6363
echo "Resolved to ${dep}@${rev}"
6464

6565
# Add the replace directive

0 commit comments

Comments
 (0)