Skip to content

Commit

Permalink
fix(cli): do not prompt for device when --open is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jan 26, 2023
1 parent 1af9be9 commit 8835633
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
14 changes: 9 additions & 5 deletions tooling/cli/src/mobile/android/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,15 @@ fn run_dev(
) -> Result<()> {
setup_dev_config(&mut options.config)?;
let env = env()?;
let device = match device_prompt(&env, options.device.as_deref()) {
Ok(d) => Some(d),
Err(e) => {
log::error!("{e}");
None
let device = if options.open {
None
} else {
match device_prompt(&env, options.device.as_deref()) {
Ok(d) => Some(d),
Err(e) => {
log::error!("{e}");
None
}
}
};

Expand Down
14 changes: 9 additions & 5 deletions tooling/cli/src/mobile/ios/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,15 @@ fn run_dev(
) -> Result<()> {
setup_dev_config(&mut options.config)?;
let env = env()?;
let device = match device_prompt(&env, options.device.as_deref()) {
Ok(d) => Some(d),
Err(e) => {
log::error!("{e}");
None
let device = if options.open {
None
} else {
match device_prompt(&env, options.device.as_deref()) {
Ok(d) => Some(d),
Err(e) => {
log::error!("{e}");
None
}
}
};

Expand Down

0 comments on commit 8835633

Please sign in to comment.