Simplify regexp match
This commit is contained in:
parent
d98ff95b3e
commit
45d3e436ee
@ -24,7 +24,7 @@ module MacOS::XQuartz extend self
|
|||||||
else
|
else
|
||||||
# Finally, try to find it via pkgutil. This is slow, and only works
|
# Finally, try to find it via pkgutil. This is slow, and only works
|
||||||
# for the upstream XQuartz package, so use it as a last resort.
|
# for the upstream XQuartz package, so use it as a last resort.
|
||||||
MacOS.pkgutil_info(FORGE_PKG_ID) =~ /version: (\d\.\d\.\d).+$/ and $1
|
MacOS.pkgutil_info(FORGE_PKG_ID)[/version: (\d\.\d\.\d).+$/, 1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user