Skip to content

Commit

Permalink
Fix a bug where non-existance image causes error when checking tag ex…
Browse files Browse the repository at this point in the history
…istance
  • Loading branch information
keimoon committed Jan 10, 2018
1 parent f7373db commit 134d968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// Version returns doriath version
func Version() string {
return "1.2.0"
return "1.2.1"
}

// ResolveDir appends a path to a rootDir
Expand Down
3 changes: 3 additions & 0 deletions utils/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ func dockerCheckTagSecondRequest(shortName, tag, authType, token string, credent
return false, stacktrace.Propagate(err, "Cannot read body of request to %s", tagListURL)
}
if response.StatusCode != http.StatusOK {
if response.StatusCode == http.StatusNotFound {
return false, nil
}
return false, stacktrace.NewError("Unexpected status: %d, response body: %s", response.StatusCode, string(responseBody))
}
var tagResponse struct {
Expand Down

0 comments on commit 134d968

Please sign in to comment.