mirror of
https://github.com/unitedstates/contact-congress.git
synced 2025-12-19 17:37:24 -05:00
Use exit code 1 on YAML lint failure
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
|
||||||
path = File.expand_path('../members', File.dirname(__FILE__))
|
path = File.expand_path('../members', File.dirname(__FILE__))
|
||||||
|
code = 0
|
||||||
|
|
||||||
Dir.glob(path + '/*.yaml') do |f|
|
Dir.glob(path + '/*.yaml') do |f|
|
||||||
begin
|
begin
|
||||||
@@ -10,5 +11,8 @@ Dir.glob(path + '/*.yaml') do |f|
|
|||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
puts "Error in file #{f}:"
|
puts "Error in file #{f}:"
|
||||||
puts e.message
|
puts e.message
|
||||||
|
code = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
exit code
|
||||||
|
|||||||
Reference in New Issue
Block a user