summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop.yml4
-rw-r--r--lib/gitlab/task_helpers.rb9
2 files changed, 8 insertions, 5 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 563a00db6c0..4e80b49ccd2 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -19,6 +19,10 @@ AllCops:
- 'builds/**/*'
CacheRootDirectory: tmp
+# TODO: Remove me after updating gitlab-style
+Style/TrailingUnderscoreVariable:
+ Enabled: false
+
# Gitlab ###################################################################
Gitlab/ModuleWithInstanceVariables:
diff --git a/lib/gitlab/task_helpers.rb b/lib/gitlab/task_helpers.rb
index c1182af1014..34bee6fecbe 100644
--- a/lib/gitlab/task_helpers.rb
+++ b/lib/gitlab/task_helpers.rb
@@ -1,6 +1,7 @@
require 'rainbow/ext/string'
require 'gitlab/utils/strong_memoize'
+# rubocop:disable Rails/Output
module Gitlab
TaskFailedError = Class.new(StandardError)
TaskAbortedByUserError = Class.new(StandardError)
@@ -96,11 +97,9 @@ module Gitlab
end
def gid_for(group_name)
- begin
- Etc.getgrnam(group_name).gid
- rescue ArgumentError # no group
- "group #{group_name} doesn't exist"
- end
+ Etc.getgrnam(group_name).gid
+ rescue ArgumentError # no group
+ "group #{group_name} doesn't exist"
end
def gitlab_user