Handle no config_file with clean abort message, implement init command #1

Merged
merged 1 commit into from Apr 23, 2012

Conversation

Projects
None yet
2 participants
Contributor

cldwalker commented Apr 23, 2012

When using pairhost without a config, you get:

$ pairhost list
/Users/me/.rip/active/lib/pairhost.rb:8:in `initialize': No such file or directory - /Users/me/.pairhost/config.yml (Errno::ENOENT)
        from /Users/me/.rip/active/lib/pairhost.rb:8:in `open'
        from /Users/me/.rip/active/lib/pairhost.rb:8:in `config'
        from /Users/me/.rip/active/lib/pairhost.rb:19:in `connection'
        from /Users/me/.rip/active/lib/pairhost.rb:134:in `list'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
        from /Users/me/.rip/active/bin/pairhost:6:in `<main>'

I added an abort message and implemented init so it results in:

$ pairhost list
No pairhost config found. First run 'pairhost init'.
$ pairhost init
# ready to rock

karnowski added a commit that referenced this pull request Apr 23, 2012

Merge pull request #1 from cldwalker/init
Handle no config_file with clean abort message, implement init command

@karnowski karnowski merged commit 300ddd8 into karnowski:master Apr 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment