mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
feat: experiments logging improvements (#2049)
* feat: warn when enabling inactive experiments * feat: TASK_ environment prefix * feat: calculate experiment enabled/active instead of storing * refactor: rename GetTaskVar to GetTaskEnv * feat: experiments tests
This commit is contained in:
@@ -69,7 +69,7 @@ func run() error {
|
||||
}
|
||||
|
||||
if flags.Experiments {
|
||||
return experiments.List(log)
|
||||
return log.PrintExperiments()
|
||||
}
|
||||
|
||||
if flags.Init {
|
||||
@@ -109,6 +109,10 @@ func run() error {
|
||||
dir = home
|
||||
}
|
||||
|
||||
if err := experiments.Validate(); err != nil {
|
||||
log.Warnf("%s\n", err.Error())
|
||||
}
|
||||
|
||||
var taskSorter sort.TaskSorter
|
||||
switch flags.TaskSort {
|
||||
case "none":
|
||||
@@ -154,9 +158,6 @@ func run() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if experiments.AnyVariables.Enabled {
|
||||
log.Warnf("The 'Any Variables' experiment flag is no longer required to use non-map variable types. If you wish to use map variables, please use 'TASK_X_MAP_VARIABLES' instead. See https://github.com/go-task/task/issues/1585\n")
|
||||
}
|
||||
|
||||
// If the download flag is specified, we should stop execution as soon as
|
||||
// taskfile is downloaded
|
||||
|
||||
Reference in New Issue
Block a user