diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-23 23:52:21 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-29 10:49:13 -0700 |
commit | 3e9b612306e026e7a91bd1bc5e52cc6f0c9c48de (patch) | |
tree | dcf30e087f8f82ff3368d5ca3322ffc7b7bb625b /lib/tasks | |
parent | 82f0d3e655c48fc67adea88af681d0b5d81810de (diff) | |
download | gitlab-ce-3e9b612306e026e7a91bd1bc5e52cc6f0c9c48de.tar.gz |
Check that project was actually created rather than just validated in import:repos task
Add gitlab-shell to error message to give user a clue that something may be wrong there.
Ran into this in #2082. User was told that repositories were created when they were
not due to hooks symlink being wrong.
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/import.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/import.rake b/lib/tasks/gitlab/import.rake index 5f83e5e8e7f..c1ee271ae2b 100644 --- a/lib/tasks/gitlab/import.rake +++ b/lib/tasks/gitlab/import.rake @@ -62,11 +62,11 @@ namespace :gitlab do project = Projects::CreateService.new(user, project_params).execute - if project.valid? + if project.persisted? puts " * Created #{project.name} (#{repo_path})".green else puts " * Failed trying to create #{project.name} (#{repo_path})".red - puts " Validation Errors: #{project.errors.messages}".red + puts " Errors: #{project.errors.messages}".red end end end |