mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
hotfix: nil pointer uppon some registry error
This commit is contained in:
parent
a660cc0d01
commit
a7e14a3065
1 changed files with 1 additions and 1 deletions
|
@ -162,10 +162,10 @@ func (r *Registry) GetRemoteTags(registries []string, repository string, token [
|
|||
}
|
||||
req.Header.Set("Authorization", "Token "+strings.Join(token, ", "))
|
||||
res, err := r.client.Do(req)
|
||||
utils.Debugf("Got status code %d from %s", res.StatusCode, endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
utils.Debugf("Got status code %d from %s", res.StatusCode, endpoint)
|
||||
defer res.Body.Close()
|
||||
|
||||
if res.StatusCode != 200 && res.StatusCode != 404 {
|
||||
|
|
Loading…
Reference in a new issue