fix: ensure config properties for an app are setup prior to usage

This commit is contained in:
Jose Diaz-Gonzalez
2025-11-15 16:42:32 -05:00
parent f2f6e0b473
commit 81e6cdf5a5

View File

@@ -71,8 +71,12 @@ func TriggerInstall() error {
return nil
}
// migrate all created-at values from app mod-time to property
// migrate all app ENV files to config path
for _, appName := range apps {
if err := common.PropertySetupApp("config", appName); err != nil {
return fmt.Errorf("Unable to setup app environment: %s", err.Error())
}
oldEnvFile := filepath.Join(common.AppRoot(appName) + "ENV")
isMigrated := common.PropertyGetDefault("config", appName, "env-migrated", "")
// delete the old file on the next install
@@ -91,10 +95,6 @@ func TriggerInstall() error {
continue
}
if err := common.PropertySetupApp("config", appName); err != nil {
return fmt.Errorf("Unable to setup app environment: %s", err.Error())
}
// merge in the old env into the new env
oldEnv, err := loadFromFile(appName, oldEnvFile)
if err != nil {