guard against multiple 'zrok enable' (#190)

This commit is contained in:
Michael Quigley 2023-01-30 16:50:50 -05:00
parent 855f0c285c
commit c633b13e00
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -44,6 +44,10 @@ func (cmd *enableCommand) run(_ *cobra.Command, args []string) {
}
token := args[0]
if zrd.Env != nil {
tui.Error(fmt.Sprintf("you already have an enabled environment, %v first before you %v", tui.Code.Render("zrok disable"), tui.Code.Render("zrok enable")), nil)
}
hostName, hostDetail, err := getHost()
if err != nil {
panic(err)