summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-09 17:50:26 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-09 17:50:26 +0000
commitf23dcac91b12a0873a6f3463ecc7f5ee3afc46a1 (patch)
tree4b9346e0cd7fbd265611841df5adbc5145031938
parent4e9add7c2c118a16b205cef9ccf7bfb314116844 (diff)
parent63ba983511461e749825abe120ec34f3e7c7fd96 (diff)
downloadgitlab-ce-f23dcac91b12a0873a6f3463ecc7f5ee3afc46a1.tar.gz
Merge branch 'ensure_satellite_exists' into 'master'
Ensure satellite exists instead of raising an error
-rw-r--r--lib/gitlab/satellite/satellite.rb6
1 files 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