builder: Fix CMD to inject /bin/sh -c when provided with a non-json value

closes #8264 

/cc @aanand @tiborvass 
I can do that.
On Sep 29, 2014, at 11:24 AM, Tibor Vass <notifications@github.com> wrote:

> In integration-cli/docker_cli_build_test.go:
> 
> > +	if _, err := buildImage(name, "FROM busybox\nCMD [\"echo\", \"cmd\"]", true); err != nil {
> > +		t.Fatal(err)
> > +	}
> > +
> > +	res, err = inspectFieldJSON(name, "Config.Cmd")
> > +	if err != nil {
> > +		t.Fatal(err, res)
> > +	}
> > +
> > +	expected = `["echo","cmd"]`
> > +
> > +	if res != expected {
> > +		t.Fatalf("Expected value %s not in Config.Cmd: %s", expected, res)
> > +	}
> > +
> > +	logDone("build - cmd should have sh -c for non-json")
> the description of the test reflects only half of the test. You also check for the JSON one. Maybe we should separate it into two tests?
> 
> —
> Reply to this email directly or view it on GitHub.
>