diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-10-05 23:29:34 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-10-05 23:29:34 +0000 |
commit | ca7c80ce2a07a7e581fcf991b5ecc06b0e6224f9 (patch) | |
tree | a7b66ce3f82fef704187501780967c59ab1e825b /lib/gitlab_projects.rb | |
parent | fad9498c1b15e96bf553064d77dc33c17ff7baa7 (diff) | |
parent | 9dc7a11955b35cc2edb105898a59d914796702f2 (diff) | |
download | gitlab-shell-ca7c80ce2a07a7e581fcf991b5ecc06b0e6224f9.tar.gz |
Merge branch 'fix-ionice' into 'master'
Fix short circuit logic between rsync with and without ionice for storage migrations
See merge request !96
Diffstat (limited to 'lib/gitlab_projects.rb')
-rw-r--r-- | lib/gitlab_projects.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index 3d92cf2..d3d45ae 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -321,7 +321,9 @@ class GitlabProjects rsync_path = 'ionice -c2 -n7 rsync' result = system(*%W(#{rsync_path} -a --delete --rsync-path="#{rsync_path}" #{source_path} #{new_full_path})) - unless result + if result + true + else # If the command fails with `ionice` (maybe because we're on a OS X # development machine), try again without `ionice`. rsync_path = 'rsync' |