Skip to content

Commit f80b2ed

Browse files
committed
Handle not ready repos
1 parent 8bbd1a3 commit f80b2ed

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/tasks/gts/repos.rake

+9-5
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ namespace :gts do
4646
repository.hashed_path = repository.url_path
4747
repository.save!
4848

49-
# move repo directory
50-
FileUtils.mkdir_p(new_dir)
51-
FileUtils.mv(old_path, new_path)
49+
if repository.ready?
50+
# move repo directory
51+
FileUtils.mkdir_p(new_dir)
52+
FileUtils.mv(old_path, new_path)
5253

53-
# fix hooks symlinks (they're relative)
54-
RepositoryHooks.create(Pathname(new_path))
54+
# fix hooks symlinks (they're relative)
55+
RepositoryHooks.create(Pathname(new_path))
56+
else
57+
puts "warning: repository doesn't exist on disk"
58+
end
5559
end
5660
end
5761
end

0 commit comments

Comments
 (0)