env-manager: ui polish (#127)
* env-manager: migrate to pico 2.0.6
* env: option to hide children from ui
* introduce template hierarchy
* style: improve menu styling
* env: reorganize tasks, pull before install
---------
Co-authored-by: Giorgi Lekveishvili <lekva@gl-mbp-m1-max.local>
diff --git a/core/installer/app_manager.go b/core/installer/app_manager.go
index 744f9a2..e3fc8b1 100644
--- a/core/installer/app_manager.go
+++ b/core/installer/app_manager.go
@@ -52,9 +52,9 @@
}
func (m *AppManager) Install(app App, ns NamespaceGenerator, suffixGen SuffixGenerator, config map[string]any) error {
- // if err := m.repoIO.Fetch(); err != nil {
- // return err
- // }
+ if err := m.repoIO.Pull(); err != nil {
+ return err
+ }
suffix, err := suffixGen.Generate()
if err != nil {
return err
@@ -100,9 +100,9 @@
}
func (m *AppManager) Update(app App, instanceId string, config map[string]any) error {
- // if err := m.repoIO.Fetch(); err != nil {
- // return err
- // }
+ if err := m.repoIO.Pull(); err != nil {
+ return err
+ }
globalConfig, err := m.repoIO.ReadConfig()
if err != nil {
return err
@@ -126,9 +126,9 @@
}
func (m *AppManager) Remove(instanceId string) error {
- // if err := m.repoIO.Fetch(); err != nil {
- // return err
- // }
+ if err := m.repoIO.Pull(); err != nil {
+ return err
+ }
return m.repoIO.RemoveApp(filepath.Join(appDir, instanceId))
}