Jelajahi Sumber

Merge pull request #20901 from HackToday/buildimage

Fix the driver name empty case
Sebastiaan van Stijn 9 tahun lalu
induk
melakukan
89d950303c
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      volume/store/store.go

+ 3 - 1
volume/store/store.go

@@ -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
 	}