mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +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")
|
_, _ = fmt.Fprintf(os.Stderr, "\n")
|
||||||
|
|
||||||
if zrd.Env == nil {
|
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"))
|
_, _ = fmt.Fprintf(os.Stderr, "To create a local environment use the %v command.\n", tui.CodeStyle.Render("zrok enable"))
|
||||||
} else {
|
} else {
|
||||||
_, _ = fmt.Fprintf(os.Stdout, tui.CodeStyle.Render("Environment")+":\n\n")
|
_, _ = 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) {
|
func Error(msg string, err error) {
|
||||||
if err != nil {
|
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 {
|
} else {
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "%v %v\n", ErrorLabel, msg)
|
_, _ = fmt.Fprintf(os.Stderr, "[%v] %v\n", ErrorLabel, msg)
|
||||||
}
|
}
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ func checkMetadata() error {
|
|||||||
}
|
}
|
||||||
data, err := os.ReadFile(mf)
|
data, err := os.ReadFile(mf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tui.Warning("unable to open zrokdir metadata; ignoring")
|
tui.Warning("unable to open zrokdir metadata; ignoring\n")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
m := &Metadata{}
|
m := &Metadata{}
|
||||||
|
Loading…
Reference in New Issue
Block a user