Skip to content

Commit d726256

Browse files
committed
move error
1 parent 26f4a65 commit d726256

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

framework/components/clnode/clnode.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
253253
})
254254
}
255255
req.Files = append(req.Files, files...)
256-
if req.Image != "" && (in.Node.DockerFilePath != "" || in.Node.DockerContext != "") {
257-
return nil, errors.New("you provided both 'image' and one of 'docker_file', 'docker_ctx' fields. Please provide either 'image' or params to build a local one")
258-
}
259256
if req.Image == "" {
257+
if in.Node.DockerFilePath != "" || in.Node.DockerContext != "" {
258+
return nil, errors.New("image field is empty but there are no 'docker_ctx' or 'docker_file' set in TOML config")
259+
}
260260
req.Image = TmpImageName
261261
if err := framework.BuildImageOnce(once, in.Node.DockerContext, in.Node.DockerFilePath, req.Image); err != nil {
262262
return nil, err

0 commit comments

Comments
 (0)