Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
817b3b32b1 |
14
main.go
14
main.go
@@ -86,6 +86,14 @@ func main() {
|
|||||||
if *exitCodeFlag {
|
if *exitCodeFlag {
|
||||||
os.Exit(20)
|
os.Exit(20)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log.Debugf("no packages in queue")
|
||||||
|
if *jsonFlag {
|
||||||
|
err = json.NewEncoder(os.Stdout).Encode(JSONOut{
|
||||||
|
Total: len(packagesInQueue),
|
||||||
|
Packages: packagesInQueue,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,10 +135,10 @@ func ALHPBuildQueuePkgbase() ([]string, error) {
|
|||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode == http.StatusNotFound {
|
||||||
return nil, fmt.Errorf("ALHP api returned HTTP %d", resp.StatusCode)
|
|
||||||
} else if resp.StatusCode == http.StatusNotFound {
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
} else if resp.StatusCode != http.StatusOK {
|
||||||
|
return nil, fmt.Errorf("ALHP api returned HTTP %d", resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
bResp, err := io.ReadAll(resp.Body)
|
bResp, err := io.ReadAll(resp.Body)
|
||||||
|
Reference in New Issue
Block a user