mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
simplify error check
This commit is contained in:
@@ -82,13 +82,16 @@ func clone(url string) error {
|
||||
if err := cmd.Run(); err != nil {
|
||||
return fmt.Errorf("could not run git clone: %v", err)
|
||||
}
|
||||
} else if err != nil {
|
||||
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not stat dir: %v", err)
|
||||
} else {
|
||||
cmd := exec.Command("git", "-C", dir, "pull")
|
||||
if err := cmd.Run(); err != nil {
|
||||
return fmt.Errorf("could not pull repo: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
cmd := exec.Command("git", "-C", dir, "pull")
|
||||
if err := cmd.Run(); err != nil {
|
||||
return fmt.Errorf("could not pull repo: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user