Skip to content

Commit

Permalink
Do not install base modules when --existing-config is used farmOS#821
Browse files Browse the repository at this point in the history
  • Loading branch information
mstenta committed Apr 3, 2024
1 parent 5d24c2d commit 6d26f76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Fix Client error when passing asset parameter to forms #814](https://github.com/farmOS/farmOS/pull/814)
- [Update patch for Issue #3397275 to fix boolean field JSON Schema #819](https://github.com/farmOS/farmOS/pull/819)
- [Do not trim whitespace from quantity field item content #820](https://github.com/farmOS/farmOS/pull/820)
- [Do not install base modules when --existing-config is used #821](https://github.com/farmOS/farmOS/pull/821)

## [3.1.2] 2024-02-26

Expand Down
10 changes: 10 additions & 0 deletions farm.install
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ function farm_install_modules(array &$install_state) {
$modules = array_merge(array_keys($all['base']), $modules);
}

// If the --existing-config flag is set, do not install additional modules.
// We assume that a site that is using configuration management has made its
// own decisions about which modules should be installed. By installing any
// additional modules here we could end up with overridden configuration. For
// example, it is possible that some of the optional base modules have been
// uninstalled in these instances, and we should not reinstall them.
if (!empty($install_state['parameters']['existing_config']) && $install_state['parameters']['existing_config'] === TRUE) {
$modules = [];
}

// If this is running in the context of a functional test, do not install any
// additional modules. This is a temporary hack.
// @see Drupal\Tests\farm_test\Functional\FarmBrowserTestBase::setUp()
Expand Down

0 comments on commit 6d26f76

Please sign in to comment.