chrisroberts/vagabond — pull request #3 by zuazo (2013-03-25 01:16:45+00:00)
Title: check command errors in vagabond create action

# Output examples in Ubuntu 10.04

## Before this change

```
$ vagabond up graphite
WARNING: Local chef server is not currently running!
Vagabond: Creating graphite
~/.rvm/gems/ruby-1.9.2-p320/gems/vagabond-0.2.0/lib/vagabond/actions/create.rb:31:in `do_create': undefined method `split' for nil:NilClass (NoMethodError)
from ~/.rvm/gems/ruby-1.9.2-p320/gems/vagabond-0.2.0/lib/vagabond/actions/create.rb:11:in `_create'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/vagabond-0.2.0/lib/vagabond/actions/up.rb:27:in `_up'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/vagabond-0.2.0/lib/vagabond/vagabond.rb:120:in `execute'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/vagabond-0.2.0/lib/vagabond/vagabond.rb:103:in `block (3 levels) in '
from ~/.rvm/gems/ruby-1.9.2-p320/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from ~/.rvm/gems/ruby-1.9.2-p320/gems/vagabond-0.2.0/bin/vagabond:12:in `'
from ~/.rvm/gems/ruby-1.9.2-p320/bin/vagabond:19:in `load'
from ~/.rvm/gems/ruby-1.9.2-p320/bin/vagabond:19:in `

'
from ~/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `eval'
from ~/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `

'
```

## After this change

```
$ vagabond up graphite
WARNING: Local chef server is not currently running!
Vagabond: Creating graphite
rvmsudo lxc-start-ephemeral -d -b ~/chef-repo/cookbooks -o ubuntu_1204 && sleep 3
~/.rvm/gems/ruby-1.9.2-p320/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:248:in `invalid!': Expected process to exit with [0], but received '1' (Mixlib::ShellOut::ShellCommandFailed)
---- Begin output of rvmsudo lxc-start-ephemeral -d -b ~/chef-repo/cookbooks -o ubuntu_1204 && sleep 3 ----
STDOUT:
STDERR: sudo: lxc-start-ephemeral: command not found
---- End output of rvmsudo lxc-start-ephemeral -d -b ~/chef-repo/cookbooks -o ubuntu_1204 && sleep 3 ----
```