Merge pull request #236 from tariq1890/master

Fixing megacheck issues reported by gometalinter
This commit is contained in:
Shawn Smith
2018-06-11 16:49:31 +09:00
committed by GitHub
8 changed files with 12 additions and 35 deletions

View File

@@ -85,6 +85,9 @@ func download(path, dest string, firstAttempt bool) (root *vcs.RepoRoot, err err
// may have been rebased; we delete the directory, then try one more time:
log.Printf("Failed to update %q (%v), trying again...", root.Repo, err.Error())
err = os.RemoveAll(fullLocalPath)
if err != nil {
log.Printf("Failed to delete directory %s", fullLocalPath)
}
return download(path, dest, false)
}
return root, err