Commit f23dcac9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ensure_satellite_exists' into 'master'

Ensure satellite exists instead of raising an error
parents 4e9add7c 63ba9835
...@@ -22,7 +22,7 @@ module Gitlab ...@@ -22,7 +22,7 @@ module Gitlab
end end
def clear_and_update! def clear_and_update!
raise SatelliteNotExistError unless exists? project.ensure_satellite_exists
@repo = nil @repo = nil
clear_working_dir! clear_working_dir!
...@@ -54,7 +54,7 @@ module Gitlab ...@@ -54,7 +54,7 @@ module Gitlab
# * Changes the current directory to the satellite's working dir # * Changes the current directory to the satellite's working dir
# * Yields # * Yields
def lock def lock
raise SatelliteNotExistError unless exists? project.ensure_satellite_exists
File.open(lock_file, "w+") do |f| File.open(lock_file, "w+") do |f|
begin begin
...@@ -76,7 +76,7 @@ module Gitlab ...@@ -76,7 +76,7 @@ module Gitlab
end end
def repo def repo
raise SatelliteNotExistError unless exists? project.ensure_satellite_exists
@repo ||= Grit::Repo.new(path) @repo ||= Grit::Repo.new(path)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment