Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorrjohn committed Jan 28, 2025
1 parent c2803d7 commit e9aa8e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ def with_new_rails_app(*cli_options, &block)
FileUtils.mkdir_p(cache_dir)

Dir.mktmpdir do |tmpdir|
puts "*" * 80
if Dir.exist?("#{cache_dir}/#{app_name}")
puts "Using cached app in #{cache_dir}/#{app_name}"
FileUtils.cp_r("#{cache_dir}/#{app_name}", tmpdir)
else
puts "Creating a new app in #{tmpdir}/#{app_name} with cli options: #{cli_options.inspect}"
create_new_rails_app("#{tmpdir}/#{app_name}", *cli_options)
FileUtils.cp_r("#{tmpdir}/#{app_name}", cache_dir) # Cache app for future runs.
end
Expand Down

0 comments on commit e9aa8e6

Please sign in to comment.