diff options
Diffstat (limited to 'support')
-rwxr-xr-x | support/go-format | 2 | ||||
-rw-r--r-- | support/go_build.rb | 4 |
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 |