Browse Source

scripts: fail explicitly in updatedep.sh when gopath.proto exists

I had been dealing with these intermittent failures for a while and
finally figured out why. The real solution is making genproto.sh less
ugly but that won't happen for a while.
Tobias Schottdorf 6 years ago
parent
commit
f63984bb33
1 changed files with 7 additions and 0 deletions
  1. 7 0
      scripts/updatedep.sh

+ 7 - 0
scripts/updatedep.sh

@@ -6,6 +6,13 @@ if ! [[ "$0" =~ scripts/updatedep.sh ]]; then
   exit 255
 fi
 
+if [ -d "gopath.proto" ]; then
+  # gopath.proto is created by genproto.sh and it thoroughly messes
+  # with go mod.
+  echo "Remove gopath.proto before running this script"
+  exit 255
+fi
+
 if [[ $(go version) != "go version go1.12"* ]]; then
   echo "expect Go 1.12+, got:" "$(go version)"
   exit 255