mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
fix: ensure config properties for an app are setup prior to usage
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user