fix: ensure config properties for an app are setup prior to usage
This commit is contained in:
1 file changed
+5
-5
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user