Skip to content

Commit 9755154

Browse files
author
Audrey McGowan
committed
strip newlines from all versions
1 parent d802564 commit 9755154

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/google/api_client/environment.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module ENV
2121
# TODO(bobaman)
2222
# Confirm that all of these Windows environments actually have access
2323
# to the `ver` command.
24-
`ver`.sub(/\s*\[Version\s*/, '/').sub(']', '').strip
24+
`ver`.sub(/\s*\[Version\s*/, '/').sub(']', '')
2525
elsif RUBY_PLATFORM =~ /darwin/i
2626
"Mac OS X/#{`sw_vers -productVersion`.strip}"
2727
elsif RUBY_PLATFORM == 'java'
@@ -33,7 +33,7 @@ module ENV
3333
"#{name}/#{version}"
3434
else
3535
`uname -sr`.sub(' ', '/')
36-
end
36+
end.strip
3737
rescue Exception
3838
RUBY_PLATFORM
3939
end

0 commit comments

Comments
 (0)