xquartz_version: escape spaces for mdls

This commit is contained in:
Misty De Meo 2012-07-31 00:44:59 -03:00
parent fcbee28447
commit 1a48dbc967

View File

@ -174,7 +174,7 @@ module MacOS extend self
# distributed by Apple is also XQuartz, and therefore covered by this method. # distributed by Apple is also XQuartz, and therefore covered by this method.
path = app_with_bundle_id(XQUARTZ_BUNDLE_ID) || app_with_bundle_id(APPLE_X11_BUNDLE_ID) path = app_with_bundle_id(XQUARTZ_BUNDLE_ID) || app_with_bundle_id(APPLE_X11_BUNDLE_ID)
version = if not path.nil? and path.exist? version = if not path.nil? and path.exist?
`mdls -raw -name kMDItemVersion #{path}`.strip `mdls -raw -name kMDItemVersion "#{path}" 2>/dev/null`.strip
end end
end end