lib/screengrab/runner.rb in screengrab-0.5.2 vs lib/screengrab/runner.rb in screengrab-0.5.3
- old
+ new
@@ -79,9 +79,10 @@
def select_device
devices = run_adb_command("adb devices -l", print_all: true, print_command: true).split("\n")
# the first output by adb devices is "List of devices attached" so remove that and any adb startup output
devices.reject! do |device|
[
+ 'server is out of date', # The adb server is out of date and must be restarted
'unauthorized', # The device has not yet accepted ADB control
'offline', # The device is offline, skip it
'* daemon', # Messages printed when the daemon is starting up
'List of devices attached' # Header of table for data we want
].any? { |status| device.include? status }