Merge pull request #10661 from mwhahaha/issue-10660

Fall back to string for dockerfile parameter
This commit is contained in:
OpenShift Merge Robot
2021-06-12 14:36:42 -04:00
committed by GitHub
2 changed files with 37 additions and 2 deletions

View File

@ -144,8 +144,8 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
if _, found := r.URL.Query()["dockerfile"]; found {
var m = []string{}
if err := json.Unmarshal([]byte(query.Dockerfile), &m); err != nil {
utils.BadRequest(w, "dockerfile", query.Dockerfile, err)
return
// it's not json, assume just a string
m = append(m, query.Dockerfile)
}
containerFiles = m
} else {