From 379f3ae933535db0e26ce59ebb660d3af75897bd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 28 Apr 2014 22:20:57 -0700 Subject: [PATCH] provisioner/chef-solo: be more lenient on json fix --- provisioner/chef-solo/provisioner.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/provisioner/chef-solo/provisioner.go b/provisioner/chef-solo/provisioner.go index 9d37b8f90..8ecf8490d 100644 --- a/provisioner/chef-solo/provisioner.go +++ b/provisioner/chef-solo/provisioner.go @@ -499,16 +499,6 @@ func (p *Provisioner) deepJsonFix(key string, current interface{}) (interface{}, } return val, nil - case bool: - return c, nil - case int: - return c, nil - case uint: - return c, nil - case float32: - return c, nil - case float64: - return c, nil case map[interface{}]interface{}: val := make(map[string]interface{}) for k, v := range c { @@ -526,10 +516,8 @@ func (p *Provisioner) deepJsonFix(key string, current interface{}) (interface{}, } return val, nil - case string: - return c, nil default: - return nil, fmt.Errorf("Unknown type for key '%s': %T", key, current) + return current, nil } }