Skip to content

Commit 3a7264f

Browse files
committed
fail fast if repo info can't be downloaded
1 parent fbcd6a8 commit 3a7264f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

download.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ func main() {
6565

6666
defer response.Body.Close()
6767

68+
if response.StatusCode != 200 {
69+
fmt.Println("unexpected status", response.StatusCode, "for", gitRepoUrl)
70+
os.Exit(1)
71+
}
72+
6873
file, err := os.Create(orgDashRepo + ".json")
6974
if err != nil {
7075
}

0 commit comments

Comments
 (0)