lib/kitchen/command.rb in test-kitchen-1.24.0 vs lib/kitchen/command.rb in test-kitchen-1.25.0
- old
+ new
@@ -109,14 +109,14 @@
# @api private
def filtered_instances(regexp)
result = begin
@config.instances.get(regexp) ||
@config.instances.get_all(/#{regexp}/)
- rescue RegexpError => e
- die "Invalid Ruby regular expression, " \
- "you may need to single quote the argument. " \
- "Please try again or consult http://rubular.com/ (#{e.message})"
+ rescue RegexpError => e
+ die "Invalid Ruby regular expression, " \
+ "you may need to single quote the argument. " \
+ "Please try again or consult http://rubular.com/ (#{e.message})"
end
result = Array(result)
if result.empty?
die "No instances for regex `#{regexp}', try running `kitchen list'"
@@ -168,9 +168,10 @@
while (instance = queue.pop)
run_action_in_thread(action, instance, *args)
end
end
end
+ Thread.abort_on_exception = true if options[:fail_fast]
threads.map(&:join)
report_errors
end
# private