diff --git a/app/jobs/shipit/cache_deploy_spec_job.rb b/app/jobs/shipit/cache_deploy_spec_job.rb index 8c97631d8..6ae032397 100644 --- a/app/jobs/shipit/cache_deploy_spec_job.rb +++ b/app/jobs/shipit/cache_deploy_spec_job.rb @@ -11,7 +11,7 @@ def perform(stack) return if stack.inaccessible? commands = Commands.for(stack) - commands.with_temporary_working_directory(commit: stack.commits.reachable.last) do |path| + commands.with_temporary_working_directory(commit: stack.commits.reachable.last, recursive: false) do |path| stack.update!(cached_deploy_spec: DeploySpec::FileSystem.new(path, stack)) end end diff --git a/test/jobs/cache_deploy_spec_job_test.rb b/test/jobs/cache_deploy_spec_job_test.rb index f9a323fc1..95d696bce 100644 --- a/test/jobs/cache_deploy_spec_job_test.rb +++ b/test/jobs/cache_deploy_spec_job_test.rb @@ -14,7 +14,8 @@ class CacheDeploySpecJobTest < ActiveSupport::TestCase @stack.update!(cached_deploy_spec: DeploySpec.new('review' => { 'checklist' => %w[foo bar] })) dir = Pathname(Dir.tmpdir) - StackCommands.any_instance.expects(:with_temporary_working_directory).with(commit: @last_commit).yields(dir) + StackCommands.any_instance.expects(:with_temporary_working_directory) + .with(commit: @last_commit, recursive: false).yields(dir) assert_equal %w[foo bar], @stack.checklist @job.perform(@stack)