mirror of
https://github.com/silicoflare/envy.git
synced 2026-05-26 19:57:59 +05:30
feat: cant pin if only pne env exists
This commit is contained in:
@@ -40,6 +40,11 @@ var pinCmd = &cobra.Command{
|
||||
envs, err := utils.GetEnvironments(dbProject.ID)
|
||||
utils.StopIfErr(err)
|
||||
|
||||
if len(envs) == 1 {
|
||||
utils.ErrPrint("The current environment is already pinned.")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
form := huh.NewForm(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[string]().
|
||||
|
||||
Reference in New Issue
Block a user