diff --git a/collector.rb b/collector.rb index 394ecc8..659ccb4 100644 --- a/collector.rb +++ b/collector.rb @@ -66,6 +66,10 @@ def validate_const(namespaced_const_string) runner = Class.new(Parser::Runner) do + class << self + attr_accessor :_has_errors + end + def runner_name "dudu" end @@ -81,7 +85,9 @@ def show(collection) return if collection.empty? puts collection.each { |pair| puts pair.join("\t") } + self.class._has_errors = true end end -runner.go(ARGV) \ No newline at end of file +runner.go(ARGV) +exit 1 if runner._has_errors