fix(jar): not returned error on download returns not 200 resp
This commit is contained in:
parent
9b219d967e
commit
08407afe1e
@ -55,7 +55,8 @@ func (jarFile *JarFile) Download() error {
|
|||||||
|
|
||||||
defer out.Close()
|
defer out.Close()
|
||||||
resp, err := http.Get(jarFile.uri)
|
resp, err := http.Get(jarFile.uri)
|
||||||
if err != nil {
|
if err != nil || resp.StatusCode > 200 {
|
||||||
|
os.Remove(jarFile.filePath)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user