зеркало из https://github.com/golang/build.git
go.tools/dashboard: don't do method calls or field lookups on a possibly nil repo
LGTM=mischief, adg R=adg, mischief CC=golang-codereviews https://golang.org/cl/106660043
This commit is contained in:
Родитель
4a47c1df3b
Коммит
a2017f1b12
|
@ -623,12 +623,14 @@ func commitPoll(repo *Repo, pkg, key string) {
|
|||
repo, err = RemoteRepo(pkg, pkgPath)
|
||||
if err != nil {
|
||||
log.Printf("Error cloning package (%s): %s", pkg, err)
|
||||
return
|
||||
}
|
||||
|
||||
repo, err = repo.Clone(repo.Path, "tip")
|
||||
path := repo.Path
|
||||
repo, err = repo.Clone(path, "tip")
|
||||
if err != nil {
|
||||
log.Printf("%s: hg clone failed: %v", pkg, err)
|
||||
if err := os.RemoveAll(repo.Path); err != nil {
|
||||
if err := os.RemoveAll(path); err != nil {
|
||||
log.Printf("%s: %v", pkg, err)
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче