浏览代码

fix: 移除错误引入的文件 (#75)

LoGin 5 月之前
父节点
当前提交
04c1a55506
共有 2 个文件被更改,包括 0 次插入40 次删除
  1. 0 17
      dadk-config/templates/config/actions/mod.rs
  2. 0 23
      dadk-config/templates/config/actions/user.rs

+ 0 - 17
dadk-config/templates/config/actions/mod.rs

@@ -1,17 +0,0 @@
-use crate::context::DADKExecContext;
-
-pub mod user;
-
-pub fn run(ctx: DADKExecContext) {
-    match &ctx.command.action {
-        crate::console::Action::Kernel => {
-            unimplemented!("kernel command has not implemented for run yet.")
-        }
-        crate::console::Action::Rootfs(_rootfs_command) => {
-            unimplemented!("rootfs command has not implemented for run yet.")
-        }
-        crate::console::Action::User(user_command) => {
-            user::run(&ctx, user_command).expect("Run user action error.")
-        }
-    }
-}

+ 0 - 23
dadk-config/templates/config/actions/user.rs

@@ -1,23 +0,0 @@
-use anyhow::Result;
-use dadk_user::dadk_user_main;
-
-use crate::{console::user::UserCommand, context::DADKExecContext};
-
-pub(super) fn run(ctx: &DADKExecContext, cmd: &UserCommand) -> Result<()> {
-    let config_dir = ctx.user_config_dir()?;
-    let cache_root_dir = ctx.cache_root_dir()?;
-    let sysroot_dir = ctx.sysroot_dir()?;
-    let dadk_user_action: dadk_user::context::Action = cmd.clone().into();
-
-    let context = dadk_user::context::DadkUserExecuteContextBuilder::default()
-        .sysroot_dir(sysroot_dir)
-        .config_dir(config_dir)
-        .action(dadk_user_action)
-        .thread_num(1)
-        .cache_dir(cache_root_dir)
-        .target_arch(ctx.target_arch())
-        .build()
-        .expect("Failed to build execute context");
-    dadk_user_main(context);
-    Ok(())
-}