Skip to content

Commit

Permalink
Return error for invalid dockerfile instruction "COPY" with no argume…
Browse files Browse the repository at this point in the history
…nts (#4795)
  • Loading branch information
gsquared94 authored Sep 17, 2020
1 parent 10275c6 commit 0917dba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/skaffold/docker/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ func readCopyCommand(value *parser.Node, envs []string, workdir string) (*copyCo

paths = append(paths, path)
}
if len(paths) == 0 {
return nil, fmt.Errorf("invalid dockerfile instruction: %q", value.Original)
}

// All paths are sources except the last one
var srcs []string
Expand Down

0 comments on commit 0917dba

Please sign in to comment.