mirror of
https://github.com/beclab/Olares
synced 2026-05-24 09:18:23 +00:00
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:
parent
b62a264c38
commit
8dea896a28
2 changed files with 18 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -36,4 +36,5 @@ daemon/bin
|
|||
docs/.vitepress/dist/
|
||||
docs/.vitepress/cache/
|
||||
node_modules
|
||||
.idea/
|
||||
.idea/
|
||||
cli/olares-cli*
|
||||
|
|
@ -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{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue