mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #20901 from HackToday/buildimage
Fix the driver name empty case
This commit is contained in:
commit
89d950303c
1 changed files with 3 additions and 1 deletions
|
@ -194,12 +194,14 @@ func (s *VolumeStore) create(name, driverName string, opts map[string]string) (v
|
|||
}
|
||||
}
|
||||
|
||||
logrus.Debugf("Registering new volume reference: driver %q, name %q", driverName, name)
|
||||
vd, err := volumedrivers.GetDriver(driverName)
|
||||
|
||||
if err != nil {
|
||||
return nil, &OpErr{Op: "create", Name: name, Err: err}
|
||||
}
|
||||
|
||||
logrus.Debugf("Registering new volume reference: driver %q, name %q", vd.Name(), name)
|
||||
|
||||
if v, _ := vd.Get(name); v != nil {
|
||||
return v, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue