mirror of
https://github.com/openziti/zrok.git
synced 2024-11-23 00:23:48 +01:00
fixes for enable/disable
This commit is contained in:
parent
b3f3b3bd73
commit
05bbcb7750
@ -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 {
|
||||
|
@ -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:")
|
||||
|
Loading…
Reference in New Issue
Block a user