Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

accept any android device name that isn't whitespace #7

Merged
merged 1 commit into from
Jan 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl PlatformManager for AndroidManager {
fn devices(&self) -> Result<Vec<Box<Device>>> {
let result = Command::new("adb").arg("devices").output()?;
let mut devices = vec![];
let device_regex = ::regex::Regex::new(r#"^(\w+)\tdevice\r?$"#)?;
let device_regex = ::regex::Regex::new(r#"^(\S+)\tdevice\r?$"#)?;
for line in String::from_utf8(result.stdout)?.split("\n").skip(1) {
if let Some(caps) = device_regex.captures(line) {
let d = AndroidDevice::from_id(&caps[1])?;
Expand Down