Skip to content

Commit ce4d62a

Browse files
committed
cmd/release: check that a gomote token exists before uploading
It's helpful to check that required credentials exist before starting the upload operation. That way, if the gomote token is missing, the user will be told right away, rather than the operation failing midway. For golang/go#45893. Change-Id: I70aec0a9021a714032f2d0a9a8e51465cefd262e Reviewed-on: https://go-review.googlesource.com/c/build/+/315929 Trust: Dmitri Shuralyov <[email protected]> Trust: Alexander Rakoczy <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]>
1 parent c52d51b commit ce4d62a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/release/release.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func main() {
6161

6262
if *uploadMode {
6363
buildenv.CheckUserCredentials()
64+
userToken() // Call userToken for the side-effect of exiting if a gomote token doesn't exist.
6465
if err := upload(flag.Args()); err != nil {
6566
log.Fatal(err)
6667
}

0 commit comments

Comments
 (0)