This commit is contained in:
Michael Quigley 2023-01-09 17:56:16 -05:00
parent 3093bd230d
commit 6cec74c2ec
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
3 changed files with 4 additions and 4 deletions

View File

@ -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")

View File

@ -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)
} }

View File

@ -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{}