lib/generators/anycable/download/download_generator.rb in anycable-rails-1.4.0.rc.3 vs lib/generators/anycable/download/download_generator.rb in anycable-rails-1.4.0.rc.4
- old
+ new
@@ -59,9 +59,11 @@
end
def download_exe(url, to:, file_name:)
file_path = File.join(to, file_name)
+ FileUtils.mkdir_p(to) unless File.directory?(to)
+
run "#{sudo(to)}curl -L #{url} -o #{file_path}", abort_on_failure: true
run "#{sudo(to)}chmod +x #{file_path}", abort_on_failure: true
run "#{file_path} -v", abort_on_failure: true
end