lib/licensed/migrations/v2.rb in licensed-2.0.1 vs lib/licensed/migrations/v2.rb in licensed-2.1.0

- old
+ new

@@ -26,10 +26,12 @@ if rubygem_cache.exist? File.rename rubygem_cache, app.cache_path.join("bundler") end app.sources.each do |source| - Dir.chdir app.cache_path.join(source.class.type) do + cache_path = app.cache_path.join(source.class.type) + next unless File.exist?(cache_path) + Dir.chdir cache_path do # licensed v1 cached records were stored as .txt files with YAML frontmatter Dir["**/*.txt"].each do |file| yaml, licenses, notices = parse_file(file) # rename the rubygem type to bundler