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

This commit is contained in:
Jose Diaz-Gonzalez committed 2026-04-27 01:06:31 -04:00
1 parent f2f6e0b473
commit 81e6cdf5a5
1 file changed
+5 -5
+5 -5
View File
@@ -71,8 +71,12 @@ func TriggerInstall() error {
return nil 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 { 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") oldEnvFile := filepath.Join(common.AppRoot(appName) + "ENV")
isMigrated := common.PropertyGetDefault("config", appName, "env-migrated", "") isMigrated := common.PropertyGetDefault("config", appName, "env-migrated", "")
// delete the old file on the next install // delete the old file on the next install
@@ -91,10 +95,6 @@ func TriggerInstall() error {
continue 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 // merge in the old env into the new env
oldEnv, err := loadFromFile(appName, oldEnvFile) oldEnv, err := loadFromFile(appName, oldEnvFile)
if err != nil { if err != nil {