fix app.sim_args

Because when passed the arguments as following

    app.sim_args += ["-com.apple.CoreData.SQLDebug 1"]

application will receive the argument like

    argv[1] = ["-com.apple.CoreData.SQLDebug
    argv[2] = 1"]

Expected:

    argv[1] = -com.apple.CoreData.SQLDebug
    argv[2] = 1
This commit is contained in:
Watson
2013-06-05 04:52:15 +09:00
parent 6269cb1f1a
commit 68aaa64360
3 changed files with 5 additions and 5 deletions

View File

@@ -88,10 +88,10 @@ task :simulator => ['build:simulator'] do
env << ' SIM_SPEC_MODE=1' if App.config.spec_mode
sim = File.join(App.config.bindir, 'ios/sim')
debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2'))
app_args = App.config.sim_args.map { |x| '"' + x + '"' }
app_args = App.config.sim_args.map { |x| '"' + x + '"' }.join(" ")
App.info 'Simulate', app
at_exit { system("stty echo") } if $stdout.tty? # Just in case the simulator launcher crashes and leaves the terminal without echo.
sh "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\" \"#{app_args}\""
sh "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\" #{app_args}"
end
desc "Create an .ipa archive"