Fixing megacheck issues reported by gometalinter

This commit is contained in:
tariqibrahim
2017-12-28 08:38:50 +05:30
committed by tariq1890
parent 9e7b523c43
commit fc16cf5477
8 changed files with 12 additions and 35 deletions

View File

@@ -84,6 +84,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