instrumenta / kubeval

Validate your Kubernetes configuration files, supports multiple Kubernetes versions
https://kubeval.com
Other
3.16k stars 229 forks source link

Error raised with closed stdin. #226

Open kevincox opened 4 years ago

kevincox commented 4 years ago

When stdin is closed an error is raised even if stdin reading is not used.

$ kubeval example.yaml </dev/null
PASS - example.yaml contains an empty YAML document
$ kubeval example.yaml <&-
ERR  - stat /dev/stdin: bad file descriptor

This can be triggered for variety of reasons, for example if using entr -r to automatically reload the command.

scovl commented 1 year ago

@kevincox Are there any permission issues with the file? Basically the error is saying that the file either does not exist or cannot be accessed (hence the error). More data is needed to know about the error. This type of error is too generic.

kevincox commented 1 year ago

No, the file was unchanged between the two examples.

scovl commented 1 year ago

No, the file was unchanged between the two examples.

@kevincox If possible, test it out. Enter the command below:

stat example.yaml

And return the output here?

kevincox commented 1 year ago

I'm not using kubeval so I can't reproduce. If the original command now works the problem was likely fixed.

scovl commented 1 year ago

@garethr Can you close the issue please