Remove broken links.

PiperOrigin-RevId: 504957670
This commit is contained in:
Adin Scannell
2023-01-26 15:33:13 -08:00
committed by gVisor bot
parent 8342c57ae8
commit 880398c3c3
+4 -1
View File
@@ -45,9 +45,12 @@ origpwd=$(pwd)
othersrc=("go.mod" "go.sum" "AUTHORS" "LICENSE")
readonly module origpwd othersrc
# Build a full gopath.
# Build a full gopath. Before copying, this scans the generated directory
# and removes broken symbolic links. It's not clear what conditions this bug
# is hit with bazel, but it happens on occasion.
declare -r go_output="${tmp_dir}/output"
make build BAZEL_OPTIONS="" TARGETS="//:gopath"
find bazel-bin/gopath/ -xtype l -delete # See above.
rsync --recursive --delete --copy-links bazel-bin/gopath/ "${go_output}"
# We expect to have an existing go branch that we will use as the basis for this