diff --git a/vendor/github.com/mitchellh/copystructure/copystructure.go b/vendor/github.com/mitchellh/copystructure/copystructure.go index 7ef83d8aa..98c5144e2 100644 --- a/vendor/github.com/mitchellh/copystructure/copystructure.go +++ b/vendor/github.com/mitchellh/copystructure/copystructure.go @@ -95,7 +95,9 @@ func (w *walker) Exit(l reflectwalk.Location) error { if v.IsValid() { s := w.cs[len(w.cs)-1] sf := reflect.Indirect(s).FieldByName(f.Name) - sf.Set(v) + if sf.CanSet() { + sf.Set(v) + } } case reflectwalk.WalkLoc: // Clear out the slices for GC @@ -111,16 +113,12 @@ func (w *walker) Map(m reflect.Value) error { return nil } - // Get the type for the map - t := m.Type() - mapType := reflect.MapOf(t.Key(), t.Elem()) - // Create the map. If the map itself is nil, then just make a nil map var newMap reflect.Value if m.IsNil() { - newMap = reflect.Indirect(reflect.New(mapType)) + newMap = reflect.Indirect(reflect.New(m.Type())) } else { - newMap = reflect.MakeMap(reflect.MapOf(t.Key(), t.Elem())) + newMap = reflect.MakeMap(m.Type()) } w.cs = append(w.cs, newMap) diff --git a/vendor/vendor.json b/vendor/vendor.json index 9931fb9d8..ee31a419f 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1410,8 +1410,10 @@ "revision": "8631ce90f28644f54aeedcb3e389a85174e067d1" }, { + "checksumSHA1": "86nE93o1VIND0Doe8PuhCXnhUx0=", "path": "github.com/mitchellh/copystructure", - "revision": "80adcec1955ee4e97af357c30dee61aadcc02c10" + "revision": "cdac8253d00f2ecf0a0b19fbff173a9a72de4f82", + "revisionTime": "2016-08-04T03:23:30Z" }, { "path": "github.com/mitchellh/go-homedir",