Fixed pre-init script order (#1348)

## Changes
`preinit` script needs to be executed before processing configuration
files to allow the script to modify the configuration or add own
configuration files.
This commit is contained in:
Andrew Nester 2024-04-08 15:28:38 +02:00 committed by GitHub
parent acec872298
commit 2f4c0c1b56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -9,14 +9,17 @@ import (
func DefaultMutators() []bundle.Mutator {
return []bundle.Mutator{
// Execute preinit script before loading any configuration files.
// It needs to be done before processing configuration files to allow
// the script to modify the configuration or add own configuration files.
scripts.Execute(config.ScriptPreInit),
loader.EntryPoint(),
loader.ProcessRootIncludes(),
// Verify that the CLI version is within the specified range.
VerifyCliVersion(),
// Execute preinit script after loading all configuration files.
scripts.Execute(config.ScriptPreInit),
EnvironmentsToTargets(),
InitializeVariables(),
DefineDefaultTarget(),