From 8dea896a28ca9cfa7f5ae456a30679656ab34a41 Mon Sep 17 00:00:00 2001 From: CobraSoftware <169102765+CobraSoftware@users.noreply.github.com> Date: Sun, 10 Aug 2025 20:32:40 -0700 Subject: [PATCH] =?UTF-8?q?feat(testing=E2=80=91mode):=20allow=20installat?= =?UTF-8?q?ion=20on=20unsupported=20OS=20+=20ignore=20build=20artifacts=20?= =?UTF-8?q?(#1673)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit included updated code to add a developer mode allowing installation on an unsupported os. Some of the code was made by Chatgpt. Co-authored-by: Cobra Software --- .gitignore | 3 ++- cli/pkg/bootstrap/precheck/tasks.go | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) 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{}