lib/souls/cli/sync/model.rb in souls-0.38.2 vs lib/souls/cli/sync/model.rb in souls-0.38.3
- old
+ new
@@ -14,11 +14,11 @@
require("#{Souls.get_mother_path}/config/souls")
worker_paths = Souls.configuration.workers.map { |n| n[:name] }
worker_paths.each do |path|
cp_path = "./apps/api/#{dir}"
old_path = "./apps/#{path}/#{dir}"
- FileUtils.rm_rf(old_path) if Dir.exist?(old_path)
- FileUtils.mkdir(old_path) unless Dir.exist?(old_path)
+ system("rm -rf #{old_path}", chdir: Souls.get_mother_path)
+ system("mkdir -p #{old_path}", chdir: Souls.get_mother_path)
system("cp -r #{cp_path}/* #{old_path}", chdir: Souls.get_mother_path)
end
end
end
end