Avoid non-existent File.exists? method in scripts/build

This commit is contained in:
Danielle McLean
2023-10-10 12:19:37 +11:00
parent bc8a81d359
commit e813ced93e

View File

@@ -481,7 +481,7 @@ def extract(packages)
) )
FileUtils.rm_rf(all_dirs) FileUtils.rm_rf(all_dirs)
Dir.mkdir('extras') unless File.exists?('extras') Dir.mkdir('extras') unless File.exist?('extras')
for dir in Dir.glob("*", base: "autoload") for dir in Dir.glob("*", base: "autoload")
if dir != "polyglot" if dir != "polyglot"
@@ -917,7 +917,7 @@ if __FILE__ == $0
FileUtils.rm_rf("tmp") FileUtils.rm_rf("tmp")
end end
Dir.mkdir('tmp') unless File.exists?('tmp') Dir.mkdir('tmp') unless File.exist?('tmp')
packages, heuristics = load_data() packages, heuristics = load_data()
packages.each do |package| packages.each do |package|