Commit f23dcac91b12a0873a6f3463ecc7f5ee3afc46a1

Authored by Dmitriy Zaporozhets
2 parents 4e9add7c 63ba9835

Merge branch 'ensure_satellite_exists' into 'master'

Ensure satellite exists instead of raising an error
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/gitlab/satellite/satellite.rb
... ... @@ -22,7 +22,7 @@ module Gitlab
22 22 end
23 23  
24 24 def clear_and_update!
25   - raise SatelliteNotExistError unless exists?
  25 + project.ensure_satellite_exists
26 26  
27 27 @repo = nil
28 28 clear_working_dir!
... ... @@ -54,7 +54,7 @@ module Gitlab
54 54 # * Changes the current directory to the satellite's working dir
55 55 # * Yields
56 56 def lock
57   - raise SatelliteNotExistError unless exists?
  57 + project.ensure_satellite_exists
58 58  
59 59 File.open(lock_file, "w+") do |f|
60 60 begin
... ... @@ -76,7 +76,7 @@ module Gitlab
76 76 end
77 77  
78 78 def repo
79   - raise SatelliteNotExistError unless exists?
  79 + project.ensure_satellite_exists
80 80  
81 81 @repo ||= Grit::Repo.new(path)
82 82 end
... ...