feat(testing‑mode): allow installation on unsupported OS + ignore build artifacts (#1673)

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 <crane-tiny-parcel@duck.com>
This commit is contained in:
CobraSoftware 2025-08-10 20:32:40 -07:00 committed by GitHub
parent b62a264c38
commit 8dea896a28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 2 deletions

3
.gitignore vendored
View file

@ -36,4 +36,5 @@ daemon/bin
docs/.vitepress/dist/
docs/.vitepress/cache/
node_modules
.idea/
.idea/
cli/olares-cli*

View file

@ -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{}