From 5cd2cfa5638fd90a01de1fe94f0a2b9eb16f8ba2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 28 Apr 2014 16:19:35 -0700 Subject: [PATCH] comment so future-mitchell knows what I've done --- common/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/config.go b/common/config.go index f55cbbb2f..0fe5ffc99 100644 --- a/common/config.go +++ b/common/config.go @@ -217,6 +217,9 @@ func decodeConfigHook(raws []interface{}) (mapstructure.DecodeHookFunc, error) { return func(f reflect.Kind, t reflect.Kind, v interface{}) (interface{}, error) { if t != reflect.String { + // We need to convert []uint8 to string. We have to do this + // because internally Packer uses MsgPack for RPC and the MsgPack + // codec turns strings into []uint8 if f == reflect.Slice { dataVal := reflect.ValueOf(v) dataType := dataVal.Type()