mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-02 22:42:49 +08:00
fix rake start_avd’ task to honor the avd’ env variable which can be used to override the default AVD configuration that should be used
This commit is contained in:
@@ -402,9 +402,10 @@ namespace 'emulator' do
|
||||
|
||||
desc "Start the emulator in the background"
|
||||
task :start_avd do
|
||||
unless `/bin/ps -a`.split(/\n/).any? { |x| x.include?('emulator64-arm') and x.include?('RubyMotion') }
|
||||
avd = (ENV['avd'] || App.config.avd_config[:name])
|
||||
unless `/bin/ps -a`.split(/\n/).any? { |x| x.include?('emulator64-arm') and x.include?(avd) }
|
||||
Rake::Task["emulator:create_avd"].invoke
|
||||
sh "\"#{App.config.sdk_path}/tools/emulator\" -avd \"#{App.config.avd_config[:name]}\" &"
|
||||
sh "\"#{App.config.sdk_path}/tools/emulator\" -avd \"#{avd}\" &"
|
||||
sh "\"#{App.config.sdk_path}/platform-tools/adb\" -e wait-for-device"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user