Browse code

Make sure to have a command to execute upon commit

Guillaume J. Charmes authored on 2013/05/21 05:50:50
Showing 1 changed files
... ...
@@ -134,6 +134,10 @@ func (b *BuilderClient) CmdInsert(args string) error {
134 134
 }
135 135
 
136 136
 func (b *BuilderClient) commit() error {
137
+	if b.config.Cmd == nil || len(b.config.Cmd) < 1 {
138
+		b.config.Cmd = []string{"echo"}
139
+	}
140
+
137 141
 	body, _, err := b.cli.call("POST", "/containers/create", b.config)
138 142
 	if err != nil {
139 143
 		return err