mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 14:50:55 +01:00
tui
This commit is contained in:
parent
3093bd230d
commit
6cec74c2ec
@ -48,7 +48,7 @@ func (cmd *statusCommand) run(_ *cobra.Command, _ []string) {
|
||||
_, _ = fmt.Fprintf(os.Stderr, "\n")
|
||||
|
||||
if zrd.Env == nil {
|
||||
_, _ = fmt.Fprintf(os.Stderr, "%v: Unable to load your local environment!\n\n", tui.WarningLabel)
|
||||
tui.Warning("Unable to load your local environment!\n")
|
||||
_, _ = fmt.Fprintf(os.Stderr, "To create a local environment use the %v command.\n", tui.CodeStyle.Render("zrok enable"))
|
||||
} else {
|
||||
_, _ = fmt.Fprintf(os.Stdout, tui.CodeStyle.Render("Environment")+":\n\n")
|
||||
|
@ -15,9 +15,9 @@ var CodeStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#00FFFF"))
|
||||
|
||||
func Error(msg string, err error) {
|
||||
if err != nil {
|
||||
_, _ = fmt.Fprintf(os.Stderr, "%v: %v (%v)\n", ErrorLabel, msg, strings.TrimSpace(err.Error()))
|
||||
_, _ = fmt.Fprintf(os.Stderr, "[%v]: %v (%v)\n", ErrorLabel, msg, strings.TrimSpace(err.Error()))
|
||||
} else {
|
||||
_, _ = fmt.Fprintf(os.Stderr, "%v %v\n", ErrorLabel, msg)
|
||||
_, _ = fmt.Fprintf(os.Stderr, "[%v] %v\n", ErrorLabel, msg)
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ func checkMetadata() error {
|
||||
}
|
||||
data, err := os.ReadFile(mf)
|
||||
if err != nil {
|
||||
tui.Warning("unable to open zrokdir metadata; ignoring")
|
||||
tui.Warning("unable to open zrokdir metadata; ignoring\n")
|
||||
return nil
|
||||
}
|
||||
m := &Metadata{}
|
||||
|
Loading…
Reference in New Issue
Block a user