moban icon indicating copy to clipboard operation
moban copied to clipboard

Trailing apostrophe in yaml

Open jayvdb opened this issue 5 years ago • 0 comments

An interesting problem encountered, the following is considered valid yaml by the currently yaml loader.

configuration:
  configuration: .moban.yaml
  template_dir:
    - ../docker-mobans/.moban.dt/'

The result is the trailing ' causes the directory to not be found, and the error message is a bit confusing as the apostrophe looks like it is closing a opening apostrophe, as error messages often do put literal strings in quotes.

Error: /home/jayvdb/projects/django-mobans/docker-mobans/.moban.dt/' does not exist

This should be checked with PyYaml to see if it detects it as a yaml error, and also check with the spec whether it should be valid. It may be an upstream bug in yaml parsers.

If it is valid everywhere, it is worth a special error message from moban.

The reason I encountered it is because I was switching between remote requires: and local directory version as described in https://github.com/moremoban/moban/issues/170 .

jayvdb avatar Jan 17 '19 07:01 jayvdb