mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 03:47:37 +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<()> {
|
) -> Result<()> {
|
||||||
setup_dev_config(&mut options.config)?;
|
setup_dev_config(&mut options.config)?;
|
||||||
let env = env()?;
|
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),
|
Ok(d) => Some(d),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("{e}");
|
log::error!("{e}");
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut dev_options: DevOptions = options.clone().into();
|
let mut dev_options: DevOptions = options.clone().into();
|
||||||
|
@ -113,12 +113,16 @@ fn run_dev(
|
|||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
setup_dev_config(&mut options.config)?;
|
setup_dev_config(&mut options.config)?;
|
||||||
let env = env()?;
|
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),
|
Ok(d) => Some(d),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("{e}");
|
log::error!("{e}");
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut dev_options: DevOptions = options.clone().into();
|
let mut dev_options: DevOptions = options.clone().into();
|
||||||
|
Loading…
Reference in New Issue
Block a user