fixes for enable/disable

This commit is contained in:
Michael Quigley 2022-11-02 14:12:19 -04:00
parent b3f3b3bd73
commit 05bbcb7750
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 3 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import (
"github.com/openziti-test-kitchen/zrok/rest_client_zrok/identity"
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
"github.com/openziti-test-kitchen/zrok/zrokdir"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@ -50,10 +51,7 @@ func (cmd *disableCommand) run(_ *cobra.Command, args []string) {
}
_, err = zrok.Identity.Disable(req, auth)
if err != nil {
if !panicInstead {
showError("zrok service call failed", err)
}
panic(err)
logrus.Warnf("service cleanup failed (%v); will clean up local environment", err)
}
if err := zrokdir.DeleteEnvironment(); err != nil {
if !panicInstead {

View File

@ -99,7 +99,7 @@ func getHost() (string, string, error) {
return info.Hostname, thisHost, nil
}
var errorStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#D90166")).Background(lipgloss.Color(0))
var errorStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#D90166")).Background(lipgloss.Color("0"))
func showError(msg string, err error) {
errorLabel := errorStyle.Render("ERROR:")