diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-11-18 14:56:29 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-11-18 14:56:29 +0000 |
commit | c7fde6a0d8d2663af7fff93f0b557b1ece148e02 (patch) | |
tree | b263e3deb91884a78e89d1003b78848fb6d6cdcb /lib/gitlab | |
parent | a5a57452319eab4d9383c002defad324d8af1193 (diff) | |
parent | 7763e61ae59b9b610cb87b30ef5ca90c94a011ea (diff) | |
download | gitlab-ce-c7fde6a0d8d2663af7fff93f0b557b1ece148e02.tar.gz |
Merge branch 'ce-mirror-backport' into 'master'
Backport relevant changes from gitlab-org/gitlab-ee!51
To do:
- [x] Update gitlab-shell
See merge request !1822
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/backend/shell.rb | 7 |
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 |