Skip to content

Commit

Permalink
Only delete directory if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Oct 15, 2018
1 parent 4bcd6f9 commit ae207c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/language_pack/rails4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def default_assets_cache

def cleanup
super
FileUtils.remove_dir(default_assets_cache) unless assets_compile_enabled?
return unless assets_compile_enabled?
return unless Dir.exist?(default_assets_cache)
FileUtils.remove_dir(default_assets_cache)
end

def run_assets_precompile_rake_task
Expand Down

0 comments on commit ae207c1

Please sign in to comment.