This commit is contained in:
co63oc
2024-06-22 16:22:03 +08:00
committed by GitHub
parent 81e459da01
commit 0ce52de59b
4 changed files with 6 additions and 6 deletions

View File

@@ -425,7 +425,7 @@ func openCommand(writer io.Writer, command string, args ...string) {
_, err := exec.LookPath(command) _, err := exec.LookPath(command)
if err != nil { if err != nil {
if errors.Is(err, exec.ErrNotFound) { if errors.Is(err, exec.ErrNotFound) {
fmt.Fprintf(writer, "Could not open your browser. Please open it maually.\n") fmt.Fprintf(writer, "Could not open your browser. Please open it manually.\n")
return return
} }
fmt.Fprintf(writer, "Failed to open browser; open %s in your browser.\nError: %s\n", args[0], err.Error()) fmt.Fprintf(writer, "Failed to open browser; open %s in your browser.\nError: %s\n", args[0], err.Error())

View File

@@ -28,7 +28,7 @@ import (
const ( const (
setFlagHelpStr = `Override an higress profile value, e.g. to choose a profile setFlagHelpStr = `Override an higress profile value, e.g. to choose a profile
(--set profile=local-k8s), or override profile values (--set gateway.replicas=2), or override helm values (--set values.global.proxy.resources.requsts.cpu=500m).` (--set profile=local-k8s), or override profile values (--set gateway.replicas=2), or override helm values (--set values.global.proxy.resources.requests.cpu=500m).`
// manifestsFlagHelpStr is the command line description for --manifests // manifestsFlagHelpStr is the command line description for --manifests
manifestsFlagHelpStr = `Specify a path to a directory of profiles manifestsFlagHelpStr = `Specify a path to a directory of profiles
(e.g. ~/Downloads/higress/manifests).` (e.g. ~/Downloads/higress/manifests).`
@@ -101,7 +101,7 @@ func newInstallCmd() *cobra.Command {
hgctl install --set profile=local-k8s --set global.enableIstioAPI=true --set gateway.replicas=2" hgctl install --set profile=local-k8s --set global.enableIstioAPI=true --set gateway.replicas=2"
# To override helm setting # To override helm setting
hgctl install --set profile=local-k8s --set values.global.proxy.resources.requsts.cpu=500m" hgctl install --set profile=local-k8s --set values.global.proxy.resources.requests.cpu=500m"
`, `,

View File

@@ -176,7 +176,7 @@ func (a *Agent) checkSudoPermission() error {
case <-time.After(5 * time.Second): case <-time.After(5 * time.Second):
cmd2.Process.Signal(os.Interrupt) cmd2.Process.Signal(os.Interrupt)
if !a.quiet { if !a.quiet {
fmt.Fprintf(a.writer, "checked result: timeout execeed and need sudo with password\n") fmt.Fprintf(a.writer, "checked result: timeout exceed and need sudo with password\n")
} }
a.runSudoState = SudoWithPassword a.runSudoState = SudoWithPassword

View File

@@ -108,7 +108,7 @@ func upgrade(writer io.Writer, iArgs *InstallArgs) error {
func promptUpgrade(writer io.Writer) bool { func promptUpgrade(writer io.Writer) bool {
answer := "" answer := ""
for { for {
fmt.Fprintf(writer, "All Higress resources will be upgraed from the cluster. \nProceed? (y/N)") fmt.Fprintf(writer, "All Higress resources will be upgrade from the cluster. \nProceed? (y/N)")
fmt.Scanln(&answer) fmt.Scanln(&answer)
if strings.TrimSpace(answer) == "y" { if strings.TrimSpace(answer) == "y" {
fmt.Fprintf(writer, "\n") fmt.Fprintf(writer, "\n")
@@ -170,7 +170,7 @@ func promptProfileContexts(writer io.Writer, profileContexts []*installer.Profil
if len(profileContexts) == 1 { if len(profileContexts) == 1 {
fmt.Fprintf(writer, "\nFound a profile:: ") fmt.Fprintf(writer, "\nFound a profile:: ")
} else { } else {
fmt.Fprintf(writer, "\nPlease select higress installed configration profiles:\n") fmt.Fprintf(writer, "\nPlease select higress installed configuration profiles:\n")
} }
index := 1 index := 1
for _, profileContext := range profileContexts { for _, profileContext := range profileContexts {