mdespuits / dotify

A CLI Tool for managing your dotfiles.
http://mattdbridges.github.com/dotify
MIT License
158 stars 10 forks source link

Install from github causes error #21

Closed dagda1 closed 11 years ago

dagda1 commented 11 years ago

I have tried to install my dofiles from an existing github repo.

I installed via the following command

dotify github dagda1/dots

If I run a command such as

dotify list

I get the following error:

➜ ~ dotify list /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:154:in parse': (/Users/paulcowan/.dotrc): couldn't parse YAML at line 8 column 8 (Psych::SyntaxError) from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:154:inparse_stream' from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:125:in parse' from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:112:inload' from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:229:in load_file' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/config.rb:49:inretrieve' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/config.rb:43:in ignore' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/filter.rb:26:infilter_ignore_files!' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/filter.rb:9:in home' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/collection.rb:12:ininitialize' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify.rb:23:in new' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify.rb:23:incollection' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/cli.rb:88:in list' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/task.rb:27:inrun' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/invocation.rb:120:in invoke_task' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor.rb:275:indispatch' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/base.rb:425:in start' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/bin/dotify:6:in<top (required)>' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/bin/dotify:19:in load' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/bin/dotify:19:in

'

My .dotrc looks like this

# Set the editor to use when editing Dotify dotfiles.
#   Default: 'vim'
#   Options: 'vi', 'vim', 'emacs', '[ANY OTHER TERMINAL BASED EDITOR]'
#
  editor: 'vi'
#
# Ignoring files in ~/.dotify when linking:
#
 ignore:
   dotify:
   - '.git'
   - '.gitignore'
   - '.gitmodules'
   # Ignoring files in the home directory when linking:
   dotify:
   - '.rbenv'
   - '.rvm'
george commented 11 years ago

White space in YAML is significant. Try left-justifying the uncommented bits of your .dotrc, indenting two spaces for nested lines. For example, editiorL 'vi' should start at the left margin.

mdespuits commented 11 years ago

@dagda1 try what @george is saying. It sounds right to me based on what I'm seeing.

dagda1 commented 11 years ago

reformatting the file worked although that was how the file was generated when I issued the github command.

mdespuits commented 11 years ago

YAML expects no whitespace on the first element. The comments are only there for reference, not for formatting