purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.67k stars 315 forks source link

Assert that 'metadata.yaml' is not parsed as raw mcl #615

Closed frebib closed 4 years ago

frebib commented 4 years ago

Contradictory to expectations, mgmt run lang metadata.yaml would produce an error similar to the following, which is likely unexpected from the user perspective:

2020-11-24 12:24:08.330968 I | cli: lang: lexing/parsing...
2020-11-24 12:24:08.331153 I | run: error: cli parse error: could not generate AST: parser: `syntax error: unexpected DOT` @1:1

Produce a user-friendly warning instead, hinting with the supported usage:

2020-11-24 13:15:01.686659 I | run: error: cli parse error: could not activate an input parser: unexpected raw code 'metadata.yaml'. Did you mean './metadata.yaml'?

Signed-off-by: Joe Groocock me@frebib.net

purpleidea commented 4 years ago

LGTM =D I have no idea what's up with travis at the moment, so I'll wait to see if it does its thing, and then I'll merge or run the tests locally!

Thanks again!

purpleidea commented 4 years ago

Travis passed!

https://travis-ci.org/github/purpleidea/mgmt/builds/745641420

All merged =D Thank you and welcome to the project! \o/