feat: experiment taskfile envs take precedence over os envs (#1633)

* feat: experiment taskfile envs take precedence over os envs

* fix test

* fix typo

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* docs: add p about default

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
This commit is contained in:
Valentin Maerten
2024-07-17 00:44:34 +02:00
committed by GitHub
parent 5739495739
commit 4b6c79aca5
5 changed files with 103 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ var (
RemoteTaskfiles Experiment
AnyVariables Experiment
MapVariables Experiment
EnvPrecedence Experiment
)
func init() {
@@ -37,6 +38,7 @@ func init() {
RemoteTaskfiles = New("REMOTE_TASKFILES")
AnyVariables = New("ANY_VARIABLES", "1", "2")
MapVariables = New("MAP_VARIABLES", "1", "2")
EnvPrecedence = New("ENV_PRECEDENCE")
}
func New(xName string, enabledValues ...string) Experiment {
@@ -104,5 +106,6 @@ func List(l *logger.Logger) error {
printExperiment(w, l, GentleForce)
printExperiment(w, l, RemoteTaskfiles)
printExperiment(w, l, MapVariables)
printExperiment(w, l, EnvPrecedence)
return w.Flush()
}