Skip to content

Commit

Permalink
[SLE]ditch named group in regexp in golang.req, the oniguruma in ruby…
Browse files Browse the repository at this point in the history
… 1.8.7 doesn't support named group
  • Loading branch information
marguerite committed Apr 3, 2016
1 parent 61f871f commit 5e96a03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions golang.req
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ importpath = RpmSysinfo.get_go_importpath
def go_get_version()
IO.popen("go version") do |process|
process.each_line do |l|
version_re = /^go version go(?<version>\S+)\s+(?<goos>[^\/]+)\/(?<goarch>.*)$/
version_re = /^go version go(\S+)\s+([^\/]+)\/(.*)$/
md = version_re.match(l.chomp)
return md[:version] if md
# 1:"1.6" 2:"linux" 3:"amd64"
return md[1] if md
end
end
end
Expand Down

0 comments on commit 5e96a03

Please sign in to comment.