Use exit code 1 on YAML lint failure

This commit is contained in:
Aaron Hill
2014-04-16 16:27:03 -04:00
parent 405859bba2
commit 3f70631e94

View File

@@ -1,6 +1,7 @@
require 'yaml'
path = File.expand_path('../members', File.dirname(__FILE__))
code = 0
Dir.glob(path + '/*.yaml') do |f|
begin
@@ -10,5 +11,8 @@ Dir.glob(path + '/*.yaml') do |f|
rescue Exception => e
puts "Error in file #{f}:"
puts e.message
code = 1
end
end
exit code