wip: 重新整理 install cmd

This commit is contained in:
zhaoyupeng
2026-01-13 20:13:29 +08:00
parent fcbaa5be2f
commit 760784a5ac
15 changed files with 957 additions and 665 deletions

View File

@@ -10,7 +10,6 @@ import (
func Check() *cobra.Command {
var (
workdir string
target string
ignoreDisk bool
ignoreMemory bool
ignoreCPU bool
@@ -32,8 +31,8 @@ func Check() *cobra.Command {
}
},
RunE: func(cmd *cobra.Command, args []string) error {
_installer := installer.NewInstaller(workdir, target)
return _installer.Check(
_installer := installer.NewInstaller(workdir)
return _installer.HardwareCheck(
cmd.Context(),
installer.WithIgnoreDiskCheck(ignoreDisk),
installer.WithIgnoreMemoryCheck(ignoreMemory),
@@ -43,7 +42,6 @@ func Check() *cobra.Command {
}
_cmd.Flags().StringVar(&workdir, "workdir", "/root/hs-installation", "Working directory")
_cmd.Flags().StringVar(&target, "target", "self", "Target")
return _cmd
}