jeremyfa / yaml.js

Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.travis.yml not parseble

Yeti-or opened this issue · comments

yaml.js couldn't parse this fragment of .travis.yml :

before_install:
  - if [ `npm -v` = "5.3.0" ]; then
      npm install -g npm@^5.4.2;
      npm -v;
    fi
> y.load('.travis.yml')
Thrown: <ParseException> Indentation problem. (line 30: '  fi')

but travis itself parse it alright

same problem here vadimdemedes/trevor#40

yaml.js doesn't play very well with those multiline with multiple indentations cases indeed.

This case should be fixable though. I will try to take a look. Meanwhile, you can remove the extra indent in you then-fi block to make it work.

Thanks for reporting!