test-kitchen/test-kitchen — pull request #266 by fnichol (2013-11-29 01:34:00+00:00)
Title: Make a nicer error on regexp failure

Yes, I had a brain fart where I forgot how to write a regexp... but maybe catch RegexpError and just print "Invalid regex" instead of some weird stacktrack like this:

```ruby
borkbork ~/devel/gh/juliandunn/chef-client (master *)$ kitchen test *centos*
-----> Starting Kitchen (v1.0.0.rc.1)
/Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/lib/kitchen/cli.rb:311:in `get_filtered_instances': target of repeat operator is not specified: /*centos*/ (RegexpError)
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/lib/kitchen/cli.rb:297:in `parse_subcommand'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/lib/kitchen/cli.rb:111:in `block in test'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/lib/kitchen/cli.rb:107:in `test'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/lib/kitchen/cli.rb:258:in `invoke_task'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/bin/kitchen:13:in `block in '
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/lib/kitchen/errors.rb:81:in `with_friendly_errors'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/test-kitchen-1.0.0.rc.1/bin/kitchen:13:in `'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/bin/kitchen:19:in `load'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/bin/kitchen:19:in `

'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/juliandunn/.rbenv/versions/1.9.3-p448/bin/ruby_noexec_wrapper:14:in `

'
```