From 0bd376b873a2b4e980fc5ba30660a5cd572cbd71 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Mon, 30 Jun 2025 19:18:48 -0700 Subject: [PATCH] Fix: switch to `--device` instead of `--device true` --- packages/cli/src/build/request.rs | 2 +- packages/cli/src/cli/target.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/build/request.rs b/packages/cli/src/build/request.rs index 750030e9f..dfc455b7a 100644 --- a/packages/cli/src/build/request.rs +++ b/packages/cli/src/build/request.rs @@ -605,7 +605,7 @@ impl BuildRequest { // We usually use the simulator unless --device is passed *or* a device is detected by probing. // For now, though, since we don't have probing, it just defaults to false // Tools like xcrun/adb can detect devices - let device = args.device.unwrap_or(false); + let device = args.device; // We want a real triple to build with, so we'll autodetect it if it's not provided // The triple ends up being a source of truth for us later hence all this work to figure it out diff --git a/packages/cli/src/cli/target.rs b/packages/cli/src/cli/target.rs index 806965ab0..c4c98ccf5 100644 --- a/packages/cli/src/cli/target.rs +++ b/packages/cli/src/cli/target.rs @@ -89,8 +89,8 @@ pub(crate) struct TargetArgs { /// Are we building for a device or just the simulator. /// If device is false, then we'll build for the simulator - #[clap(long, help_heading = HELP_HEADING)] - pub(crate) device: Option, + #[clap(long, default_value_t = false, help_heading = HELP_HEADING)] + pub(crate) device: bool, /// The base path the build will fetch assets relative to. This will override the /// base path set in the `dioxus` config.