Created
February 12, 2019 13:41
-
-
Save hsbt/c760a01d06a81bb17dbc8fe84997c348 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'find' | |
require 'open3' | |
Dir.glob("latest-gem/*") do |dir| | |
Find.find(dir) do |fn| | |
next unless File.file? fn | |
_, _, _, wait_thr = *Open3.popen3("ruby -c #{fn}") | |
if wait_thr.value.exitstatus != 0 | |
puts fn | |
File.unlink fn | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment