From 63ba983511461e749825abe120ec34f3e7c7fd96 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 9 Apr 2014 17:13:44 +0200 Subject: [PATCH] Dont raise an error with satellites, make sure it exists. --- lib/gitlab/satellite/satellite.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gitlab/satellite/satellite.rb b/lib/gitlab/satellite/satellite.rb index bdfcf254e9e..8c62778d90d 100644 --- a/lib/gitlab/satellite/satellite.rb +++ b/lib/gitlab/satellite/satellite.rb @@ -22,7 +22,7 @@ module Gitlab end def clear_and_update! - raise SatelliteNotExistError unless exists? + project.ensure_satellite_exists @repo = nil clear_working_dir! @@ -54,7 +54,7 @@ module Gitlab # * Changes the current directory to the satellite's working dir # * Yields def lock - raise SatelliteNotExistError unless exists? + project.ensure_satellite_exists File.open(lock_file, "w+") do |f| begin @@ -76,7 +76,7 @@ module Gitlab end def repo - raise SatelliteNotExistError unless exists? + project.ensure_satellite_exists @repo ||= Grit::Repo.new(path) end