add warning about hidden config change with enabled environment (#188)

This commit is contained in:
Michael Quigley 2023-01-30 13:48:57 -05:00
parent 0d237e4845
commit 4deec984ac
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -2,6 +2,7 @@ package main
import (
"fmt"
"github.com/openziti/zrok/tui"
"github.com/openziti/zrok/zrokdir"
"github.com/spf13/cobra"
"os"
@ -54,5 +55,8 @@ func (cmd *configSetCommand) run(_ *cobra.Command, args []string) {
panic(err)
}
fmt.Println("zrok configuration updated")
if zrd.Env != nil && configName == "apiEndpoint" {
fmt.Printf("\n[%v]: because you have a %v-d environment, you won't see your config change until you run %v first!\n\n", tui.WarningLabel, tui.Code.Render("zrok enable"), tui.Code.Render("zrok disable"))
}
}
}