mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-03 20:31:54 +03:00
fix(cli): do not prompt for device when --open
is provided
This commit is contained in:
parent
1af9be904a
commit
8835633955
@ -99,12 +99,16 @@ fn run_dev(
|
||||
) -> Result<()> {
|
||||
setup_dev_config(&mut options.config)?;
|
||||
let env = env()?;
|
||||
let device = match device_prompt(&env, options.device.as_deref()) {
|
||||
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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let mut dev_options: DevOptions = options.clone().into();
|
||||
|
@ -113,12 +113,16 @@ fn run_dev(
|
||||
) -> Result<()> {
|
||||
setup_dev_config(&mut options.config)?;
|
||||
let env = env()?;
|
||||
let device = match device_prompt(&env, options.device.as_deref()) {
|
||||
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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let mut dev_options: DevOptions = options.clone().into();
|
||||
|
Loading…
Reference in New Issue
Block a user