Merge pull request #9610 from duglin/Issue9602

Wrap strings that could look like ints in quotes
This commit is contained in:
Michael Crosby
2014-12-16 12:02:26 -08:00
8 changed files with 45 additions and 23 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ func (s *TagStore) CmdHistory(job *engine.Job) engine.Status {
outs := engine.NewTable("Created", 0)
err = foundImage.WalkHistory(func(img *image.Image) error {
out := &engine.Env{}
out.Set("Id", img.ID)
out.SetJson("Id", img.ID)
out.SetInt64("Created", img.Created.Unix())
out.Set("CreatedBy", strings.Join(img.ContainerConfig.Cmd, " "))
out.SetList("Tags", lookupMap[img.ID])
+4 -4
View File
@@ -62,9 +62,9 @@ func (s *TagStore) CmdImages(job *engine.Job) engine.Status {
delete(allImages, id)
if filt_tagged {
out := &engine.Env{}
out.Set("ParentId", image.Parent)
out.SetJson("ParentId", image.Parent)
out.SetList("RepoTags", []string{fmt.Sprintf("%s:%s", name, tag)})
out.Set("Id", image.ID)
out.SetJson("Id", image.ID)
out.SetInt64("Created", image.Created.Unix())
out.SetInt64("Size", image.Size)
out.SetInt64("VirtualSize", image.GetParentsSize(0)+image.Size)
@@ -85,9 +85,9 @@ func (s *TagStore) CmdImages(job *engine.Job) engine.Status {
if job.Getenv("filter") == "" {
for _, image := range allImages {
out := &engine.Env{}
out.Set("ParentId", image.Parent)
out.SetJson("ParentId", image.Parent)
out.SetList("RepoTags", []string{"<none>:<none>"})
out.Set("Id", image.ID)
out.SetJson("Id", image.ID)
out.SetInt64("Created", image.Created.Unix())
out.SetInt64("Size", image.Size)
out.SetInt64("VirtualSize", image.GetParentsSize(0)+image.Size)
+8 -8
View File
@@ -109,12 +109,12 @@ func (s *TagStore) CmdGet(job *engine.Job) engine.Status {
// metaphor, in practice people either ignore it or use it as a
// generic description field which it isn't. On deprecation shortlist.
res.SetAuto("Created", img.Created)
res.Set("Author", img.Author)
res.SetJson("Author", img.Author)
res.Set("Os", img.OS)
res.Set("Architecture", img.Architecture)
res.Set("DockerVersion", img.DockerVersion)
res.Set("Id", img.ID)
res.Set("Parent", img.Parent)
res.SetJson("Id", img.ID)
res.SetJson("Parent", img.Parent)
}
res.WriteTo(job.Stdout)
return engine.StatusOK
@@ -137,14 +137,14 @@ func (s *TagStore) CmdLookup(job *engine.Job) engine.Status {
}
out := &engine.Env{}
out.Set("Id", image.ID)
out.Set("Parent", image.Parent)
out.Set("Comment", image.Comment)
out.SetJson("Id", image.ID)
out.SetJson("Parent", image.Parent)
out.SetJson("Comment", image.Comment)
out.SetAuto("Created", image.Created)
out.Set("Container", image.Container)
out.SetJson("Container", image.Container)
out.SetJson("ContainerConfig", image.ContainerConfig)
out.Set("DockerVersion", image.DockerVersion)
out.Set("Author", image.Author)
out.SetJson("Author", image.Author)
out.SetJson("Config", image.Config)
out.Set("Architecture", image.Architecture)
out.Set("Os", image.OS)