Merge pull request #3946 from MikeMcQuaid/keg-delete-pycache-dir

keg: delete __pycache__ directory.
This commit is contained in:
ilovezfs 2018-03-18 12:12:01 -07:00 committed by GitHub
commit efe07f4a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -523,7 +523,7 @@ class Keg
def delete_pyc_files! def delete_pyc_files!
find { |pn| pn.delete if %w[.pyc .pyo].include?(pn.extname) } find { |pn| pn.delete if %w[.pyc .pyo].include?(pn.extname) }
find { |pn| pn.delete if pn.basename.to_s == "__pycache__" } find { |pn| FileUtils.rm_rf pn if pn.basename.to_s == "__pycache__" }
end end
private private