redhat-developer / opencompose

OpenCompose - A higher level abstraction for Kubernetes Resource
Apache License 2.0
64 stars 12 forks source link

Passing in multiple files does not work #167

Open concaf opened 7 years ago

concaf commented 7 years ago

OpenCompose CLI barfs when multiple files are provided.

$ opencompose convert -f examples/hello-nginx-external.yaml -f examples/hello-nginx.yaml 

ERROR: unable to read file 'examples/hello-nginx-external.yaml,examples/hello-nginx.yaml': open examples/hello-nginx-external.yaml,examples/hello-nginx.yaml: no such file or directory
$ opencompose convert -f examples/hello-nginx-external.yaml,examples/hello-nginx.yaml 

ERROR: unable to read file 'examples/hello-nginx-external.yaml,examples/hello-nginx.yaml': open examples/hello-nginx-external.yaml,examples/hello-nginx.yaml: no such file or directory

Neither of the above cases work.

concaf commented 7 years ago

Update:

But there is more to this problem, merging different object.OpenCompose structs has not been implemented yet https://github.com/redhat-developer/opencompose/blob/master/pkg/cmd/convert.go#L106, and currently, only the input from the first file passed is taken into account.

We are assuming that all the files being passed are a part of one application written in OpenCompose and we will be merging them.

CC: @kadel