Initial commit
This commit is contained in:
16
vendor/github.com/hyperhq/hypercli/builder/dockerfile/support.go
generated
vendored
Normal file
16
vendor/github.com/hyperhq/hypercli/builder/dockerfile/support.go
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package dockerfile
|
||||
|
||||
import "strings"
|
||||
|
||||
func handleJSONArgs(args []string, attributes map[string]bool) []string {
|
||||
if len(args) == 0 {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
if attributes != nil && attributes["json"] {
|
||||
return args
|
||||
}
|
||||
|
||||
// literal string command, not an exec array
|
||||
return []string{strings.Join(args, " ")}
|
||||
}
|
||||
Reference in New Issue
Block a user