| |
@@ -257,10 +257,17 @@
|
| |
stderr=subprocess.STDOUT)
|
| |
except subprocess.CalledProcessError as err:
|
| |
if b'no Go files in' in err.stdout:
|
| |
- subprocess.check_output(['go', 'get', '-d', goipath + '/...'],
|
| |
- stderr=subprocess.STDOUT)
|
| |
+ try:
|
| |
+ subprocess.check_output(['go', 'get', '-d', goipath + '/...'],
|
| |
+ stderr=subprocess.STDOUT)
|
| |
+ except subprocess.CalledProcessError as err:
|
| |
+ print(f"ERROR: Unable to 'go get {goipath}':")
|
| |
+ print(err.stdout.decode())
|
| |
+ sys.exit(1)
|
| |
else:
|
| |
- raise
|
| |
+ print(f"ERROR: Unable to 'go get {goipath}':")
|
| |
+ print(err.stdout.decode())
|
| |
+ sys.exit(1)
|
| |
repo = git.Repo(os.path.join(GIT_CACHEDIR, *get_repo_host(goipath)))
|
| |
repo.git.checkout("master")
|
| |
repo.head.reference = repo.heads.master
|
| |
check_output
consumes the output, so the user will just see an exception, but not the real problem fromgo get
.