summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-22 18:57:19 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-22 18:57:19 +0200
commitf83801a9fe092334d5b325bbe4b736aa6b88007e (patch)
tree9303896a1835f3841e176943d63088bb7df29489 /support
parent8f9046aad854e4c861c3a016cc3dd69e137a5c27 (diff)
downloadgitlab-shell-dz-update-deps.tar.gz
Update files to pass modern rubocop checks. Disable some of themdz-update-deps
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/go-format2
-rw-r--r--support/go_build.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/support/go-format b/support/go-format
index d74fc46..b5f47b7 100755
--- a/support/go-format
+++ b/support/go-format
@@ -5,7 +5,7 @@ def main(check)
cmd = %w[gofmt -s -l]
cmd << '-w' unless check
cmd += go_files
- output = IO.popen(cmd, 'r') { |io| io.read }
+ output = IO.popen(cmd, 'r', &:read)
$stdout.write(output)
abort 'gofmt failed' unless $?.success?
if check && output.lines.any? { |l| l != "\n" }
diff --git a/support/go_build.rb b/support/go_build.rb
index 1202dd2..30a6b71 100644
--- a/support/go_build.rb
+++ b/support/go_build.rb
@@ -12,7 +12,7 @@ module GoBuild
GO_ENV = {
'GOPATH' => BUILD_DIR,
- 'GO15VENDOREXPERIMENT' => '1',
+ 'GO15VENDOREXPERIMENT' => '1'
}.freeze
def create_fresh_build_dir
@@ -26,7 +26,7 @@ module GoBuild
raise "env must be a hash" unless env.is_a?(Hash)
raise "cmd must be an array" unless cmd.is_a?(Array)
- if !system(env, *cmd)
+ unless system(env, *cmd)
abort "command failed: #{env.inspect} #{cmd.join(' ')}"
end
end