magic/cmd/initialize/read.go
2026-03-28 19:25:12 +08:00

17 lines
403 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package initialize
import (
"context"
"strings"
"gitea.micah.wiki/pandora/naive/pkg/stdinx"
)
func ReadInstallHomebrew(ctx context.Context) bool {
restartFlag, err := stdinx.ReadStr(ctx, "*** 是否需要安装Homebrew确认Y or Yes按其他任意键不重启")
if err != nil {
return false
}
return strings.EqualFold(restartFlag, "yes") || strings.EqualFold(restartFlag, "y")
}