mirror of
https://github.com/silicoflare/envy.git
synced 2026-05-26 19:57:59 +05:30
feat: implement update command and add error check for toml key access
This commit is contained in:
11
cmd/list.go
11
cmd/list.go
@@ -19,9 +19,14 @@ var listCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
|
||||
project := envy.Get("envy.project").(string)
|
||||
pinned := envy.Get("envy.env").(string)
|
||||
current := envy.Get("envy.current").(string)
|
||||
project, err := utils.GetKey(envy, "envy.project")
|
||||
utils.StopIfErr(err)
|
||||
|
||||
pinned, err := utils.GetKey(envy, "envy.pinned")
|
||||
utils.StopIfErr(err)
|
||||
|
||||
current, err := utils.GetKey(envy, "envy.current")
|
||||
utils.StopIfErr(err)
|
||||
|
||||
if project == "" {
|
||||
utils.ErrPrint("Project name is empty. envy.toml file might have been modified.")
|
||||
|
||||
Reference in New Issue
Block a user