github.com/mephux/docker@v1.6.0-rc5/builder/support.go (about)

     1  package builder
     2  
     3  import (
     4  	"strings"
     5  )
     6  
     7  func handleJsonArgs(args []string, attributes map[string]bool) []string {
     8  	if len(args) == 0 {
     9  		return []string{}
    10  	}
    11  
    12  	if attributes != nil && attributes["json"] {
    13  		return args
    14  	}
    15  
    16  	// literal string command, not an exec array
    17  	return []string{strings.Join(args, " ")}
    18  }