mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 22:42:55 +08:00
[iOS8] fix a bug which invalid template path would be generated
If specify template with `rake profile template="XXXX"', it will generate invalid template path which contains unnecessary `"' as following. <key>XrayTemplatePath</key> <string>"/Applications/Xcode6-Beta5.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate</string>
This commit is contained in:
@@ -301,7 +301,7 @@ EOS
|
||||
if File.exist?(template)
|
||||
template_path = template
|
||||
elsif !builtin_templates.grep(/#{template}/i).empty?
|
||||
list = `/usr/bin/xcrun instruments -s 2>&1`.strip.split("\n").map { |line| line.sub(/^\s+"/, '').sub(/",*$/, '') }
|
||||
list = `/usr/bin/xcrun instruments -s 2>&1`.strip.split("\n").map { |line| line.sub(/^\s*"/, '').sub(/",*$/, '') }
|
||||
template = template.downcase
|
||||
template_path = list.find { |path| File.basename(path, File.extname(path)).downcase == template }
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user