diff --git a/.gitignore b/.gitignore index 782049005..2f01540b4 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,5 @@ daemon/bin docs/.vitepress/dist/ docs/.vitepress/cache/ node_modules -.idea/ \ No newline at end of file +.idea/ +cli/olares-cli* \ No newline at end of file diff --git a/cli/pkg/bootstrap/precheck/tasks.go b/cli/pkg/bootstrap/precheck/tasks.go index 09128a73a..b57af2074 100644 --- a/cli/pkg/bootstrap/precheck/tasks.go +++ b/cli/pkg/bootstrap/precheck/tasks.go @@ -75,7 +75,22 @@ func (t *SystemSupportCheck) Name() string { } func (t *SystemSupportCheck) Check(runtime connector.Runtime) error { - return runtime.GetSystemInfo().IsSupport() + err := runtime.GetSystemInfo().IsSupport() + if err == nil { + return nil + } + // Interactive warning instead of outright failure + fmt.Printf("%v Use at your own risk, would you like to continue? (Y/N): ", err) + reader, err := utils.GetBufIOReaderOfTerminalInput() + if err != nil { + return fmt.Errorf("could not read terminal input: %v", err) + } + input, _ := reader.ReadString('\n') + input = strings.TrimSpace(input) + if !strings.HasPrefix("yes", strings.ToLower(input)) { + return err + } + return nil } type RequiredPortsCheck struct{}