Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-11-11 18:22:51 +0300
committerDouwe Maan <douwe@gitlab.com>2015-11-18 14:00:56 +0300
commit841a7c6897b23957286056498cc3f05ec4330d15 (patch)
treedba78089ddaa57ce67ac251a1565b17d54fa79b3 /lib
parent531177757eef772cc7ce5dd3898c3e6803187ed6 (diff)
Store and show reason why import failed.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/backend/shell.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index 01b8bda05c6..87ac30b5ffe 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -1,6 +1,6 @@
module Gitlab
class Shell
- class AccessDenied < StandardError; end
+ class Error < StandardError; end
class KeyAdder < Struct.new(:io)
def add_key(id, key)
@@ -36,8 +36,9 @@ module Gitlab
# import_repository("gitlab/gitlab-ci", "https://github.com/randx/six.git")
#
def import_repository(name, url)
- Gitlab::Utils.system_silent([gitlab_shell_projects_path, 'import-project',
- "#{name}.git", url, '240'])
+ output, status = Popen::popen([gitlab_shell_projects_path, 'import-project', "#{name}.git", url, '240'])
+ raise Error, output unless status.zero?
+ true
end
# Move repository