mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix issue with unknown instruction within docker build
This commit is contained in:
parent
75d2244023
commit
6cbc7757b2
1 changed files with 1 additions and 0 deletions
|
@ -337,6 +337,7 @@ func (b *buildFile) Build(dockerfile, context io.Reader) (string, error) {
|
||||||
method, exists := reflect.TypeOf(b).MethodByName("Cmd" + strings.ToUpper(instruction[:1]) + strings.ToLower(instruction[1:]))
|
method, exists := reflect.TypeOf(b).MethodByName("Cmd" + strings.ToUpper(instruction[:1]) + strings.ToLower(instruction[1:]))
|
||||||
if !exists {
|
if !exists {
|
||||||
fmt.Fprintf(b.out, "Skipping unknown instruction %s\n", strings.ToUpper(instruction))
|
fmt.Fprintf(b.out, "Skipping unknown instruction %s\n", strings.ToUpper(instruction))
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
ret := method.Func.Call([]reflect.Value{reflect.ValueOf(b), reflect.ValueOf(arguments)})[0].Interface()
|
ret := method.Func.Call([]reflect.Value{reflect.ValueOf(b), reflect.ValueOf(arguments)})[0].Interface()
|
||||||
if ret != nil {
|
if ret != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue