23andMe / Yamale

A schema and validator for YAML.
MIT License
679 stars 88 forks source link

Adding --must-exist command line option #171

Open jtyr opened 3 years ago

jtyr commented 3 years ago

This PR is adding --must-exist command line option that allows to exit the execution with an error if the PATH doesn't exist. Without this option, the execution seems to be successful which might be a problem if we want to validate schema of a particular file/directory and the file/directory doesn't exist.

mildebrandt commented 2 years ago

I think this should be the default behavior, but someone is probably depending on it. This solution seems fine, and I'd like to make it the default in the next major release. Please add tests, thanks!