builder: treat unset keep-storage as 0
Signed-off-by: Tibor Vass <tibor@docker.com> (cherry picked from commit d6ac2b0db00455824c400394f316bdbc5adf8867) Signed-off-by: Tibor Vass <tibor@docker.com> Upstream-commit: dbfc648a94569d8dbc8c6468d56ec93559363bb0 Component: engine
This commit is contained in:
@ -170,6 +170,9 @@ func (br *buildRouter) postPrune(ctx context.Context, w http.ResponseWriter, r *
|
||||
return errors.Wrap(err, "could not parse filters")
|
||||
}
|
||||
ksfv := r.FormValue("keep-storage")
|
||||
if ksfv == "" {
|
||||
ksfv = "0"
|
||||
}
|
||||
ks, err := strconv.Atoi(ksfv)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "keep-storage is in bytes and expects an integer, got %v", ksfv)
|
||||
|
||||
Reference in New Issue
Block a user