Przeglądaj źródła

对于预编译源任务的DADK命令行创建,不提供构建命令的输入 (#11)

* 对DADK new预编译源任务跳过build command的输入
Chiichen 1 rok temu
rodzic
commit
b2f4e7c997
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      src/console/new_config.rs

+ 4 - 1
src/console/new_config.rs

@@ -104,7 +104,10 @@ impl NewConfigCommand {
 
         let dep: Vec<Dependency> = DependencyInput::new().input()?;
         debug!("dep: {:?}", dep);
-        let build_config: BuildConfig = BuildConfigInput::new().input()?;
+        let build_config: BuildConfig = match &task_type {
+            TaskType::InstallFromPrebuilt(_) => BuildConfig::new(Option::Some("".to_string())),
+            TaskType::BuildFromSource(_) => BuildConfigInput::new().input()?,
+        };
         debug!("build_config: {:?}", build_config);
         let install_config: InstallConfig = InstallConfigInput::new().input()?;
         debug!("install_config: {:?}", install_config);