travis-ci / travis-yaml

parses, normalizes, validates and serializes your .travis.yml
http://yaml.travis-ci.org/
MIT License
170 stars 66 forks source link

.travis.yml parsed incorrectly for strings with "mappings" #117

Open arhamahmed opened 7 years ago

arhamahmed commented 7 years ago

For example:

language: ruby
rvm:
  - 2.2.0

install:
  - touch ~/.gem/credentials
  - chmod 0600 ~/.gem/credentials
  - echo ":my_key: $MY_KEY" >> ~/.gem/credentials

the third statement is considered invalid and parsed as {:"echo \":$my_key"=>"$MY_KEY\" >> ~/.gem/credentials"} when run on a build. If the statement is run on debug mode it runs correctly without interpreting the string as a hash, as expected.

invalid_echo_parse