-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: do not require the module cache to exist for 'go mod edit'
Updates #46695 Change-Id: I4afbc1401ef4183d94c1ac6271394fac1fff95ae Reviewed-on: https://go-review.googlesource.com/c/go/+/328769 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
- Loading branch information
Bryan C. Mills
committed
Jun 21, 2021
1 parent
460900a
commit 117ebe0
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 'go mod edit' opportunistically locks the side-lock file in the module cache, | ||
# for compatibility with older versions of the 'go' command. | ||
# It does not otherwise depend on the module cache, so it should not | ||
# fail if the module cache directory cannot be created. | ||
|
||
[root] skip | ||
|
||
mkdir $WORK/readonly | ||
chmod 0555 $WORK/readonly | ||
env GOPATH=$WORK/readonly/nonexist | ||
|
||
go mod edit -go=1.17 | ||
|
||
-- go.mod -- | ||
module example.com/m |