fix: run global env migration before listing apps and set DOKKU_LIB_ROOT in tests
- Move migrateGlobalEnv() before UnfilteredDokkuApps() so the global config directory is created even on fresh installs with no apps - Add DOKKU_LIB_ROOT to Go test env vars in tests.mk
This commit is contained in:
@@ -99,15 +99,15 @@ func TriggerInstall() error {
|
|||||||
return fmt.Errorf("Unable to install the config plugin: %s", err.Error())
|
return fmt.Errorf("Unable to install the config plugin: %s", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := migrateGlobalEnv(); err != nil {
|
||||||
|
return fmt.Errorf("Unable to migrate global environment: %s", err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := migrateGlobalEnv(); err != nil {
|
|
||||||
return fmt.Errorf("Unable to migrate global environment: %s", err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
// migrate all app ENV files to config path
|
// migrate all app ENV files to config path
|
||||||
for _, appName := range apps {
|
for _, appName := range apps {
|
||||||
if err := common.PropertySetupApp("config", appName); err != nil {
|
if err := common.PropertySetupApp("config", appName); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user