From 800c5fe2548343ee546572f5e52cb21b7ba6f1c7 Mon Sep 17 00:00:00 2001 From: Suyeol Jeon Date: Thu, 14 May 2015 05:08:32 +0900 Subject: [PATCH] Fix a bug that seedfile won't be written when there's no seeds in seedfile. --- lib/cocoaseeds/core.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/cocoaseeds/core.rb b/lib/cocoaseeds/core.rb index 3dbb3b2..e6d2081 100644 --- a/lib/cocoaseeds/core.rb +++ b/lib/cocoaseeds/core.rb @@ -371,13 +371,11 @@ def configure_phase # @!visibility private # def build_lockfile - if self.seeds.length > 0 - tree = { "SEEDS" => [] } - self.seeds.each do |name, seed| - tree["SEEDS"] << "#{name} (#{seed.version})" - end - File.write(self.lockfile_path, YAML.dump(tree)) + tree = { "SEEDS" => [] } + self.seeds.each do |name, seed| + tree["SEEDS"] << "#{name} (#{seed.version})" end + File.write(self.lockfile_path, YAML.dump(tree)) end # Prints a message if {#mute} is `false`.