scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 57 forks source link

Dandelion fails with parse error: did not find expected whitespace #106

Closed kingthrillgore closed 10 years ago

kingthrillgore commented 10 years ago

When I run dandelion status or dandelion deploy, I end up getting the same error below:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): did not find expected whitespace or line break while scanning a tag at line 4 column 11 (Psych::SyntaxError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:153:in `parse'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:129:in `load'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/config.rb:34:in `load'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/config.rb:10:in `initialize'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/cli.rb:15:in `new'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/cli.rb:15:in `config'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/cli.rb:21:in `adapter'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/cli.rb:37:in `workspace'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/lib/dandelion/cli.rb:65:in `execute!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.6/bin/dandelion:8:in `<top (required)>'
    from /usr/bin/dandelion:23:in `load'
    from /usr/bin/dandelion:23:in `<main>'

I ran my yml file through lint and it appears to be valid YAML. To be sure that's not the culprit, i've posted it below:

adapter: sftp
host: ftp.my-testing-server.com
username: afakeusername
password: hunter2
preserve_permissions: false
exclude:
  - .gitignore
  - .htaccess

Running OS X Mavericks, Ruby 2.0.0p481, dandelion version 0.4.6 from Gems.

scttnlsn commented 10 years ago

@ghostfreeman Is there a ! character in your YAML file? If so you'll need to wrap the whole value in quotes (since ! is a special YAML character).

Example:

password: foo!

should become

password: "foo!"
kingthrillgore commented 10 years ago

Issue resolved. Next time I will pay attention to the YAML spec.