Currently, when given an empty data file, the validation command
produces usage information, which is super confusing and doesn't tell
the user anything. This is a side effect of the fact that both
JSON.load and YAML.load will produce a nil when they're passed an
empty string, so the command finishes with an empty set of errors but
also unsuccessfully.
Here we add a new error message so that reasonable output is produced in
this error case.
Currently, when given an empty data file, the validation command produces usage information, which is super confusing and doesn't tell the user anything. This is a side effect of the fact that both
JSON.load
andYAML.load
will produce anil
when they're passed an empty string, so the command finishes with an empty set of errors but also unsuccessfully.Here we add a new error message so that reasonable output is produced in this error case.