Created
January 2, 2020 20:36
-
-
Save frizop/0d225f10d8d0f7569803df7257c915b1 to your computer and use it in GitHub Desktop.
problem validating ruby code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Validate manifests, templates, and ruby files' | |
task :validate do | |
Dir['templates/**/*.erb'].each do |template| | |
begin | |
sh "erb -P -x -T '-' #{template} | ruby -c" | |
rescue SystemExit => e | |
puts "#{e.status}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment