瀏覽代碼

Remove commented 'no platform specified' error

Signed-off-by: Nico Burns <nico@nicoburns.com>
Nico Burns 1 天之前
父節點
當前提交
72a32a02dd
共有 1 個文件被更改,包括 1 次插入6 次删除
  1. 1 6
      packages/cli/src/build/request.rs

+ 1 - 6
packages/cli/src/build/request.rs

@@ -576,12 +576,7 @@ impl BuildRequest {
             },
             None if !using_dioxus_explicitly => Platform::TARGET_PLATFORM.unwrap(),
             None => match enabled_platforms.len() {
-                0 => match renderer {
-                    Some(_) => Platform::TARGET_PLATFORM.unwrap(),
-                    None => Platform::TARGET_PLATFORM.unwrap(),
-                    // TODO: should we always have a default
-                    // None => return Err(anyhow::anyhow!("No platform specified and no platform marked as default in Cargo.toml. Try specifying a platform with `--platform`").into()),
-                },
+                0 => Platform::TARGET_PLATFORM.unwrap(),
                 1 => enabled_platforms[0],
                 _ => {
                     return Err(anyhow::anyhow!(