mirror of
https://github.com/go-task/task.git
synced 2026-06-28 15:14:18 +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:
@@ -175,7 +175,7 @@ type Var struct {
|
||||
}
|
||||
|
||||
func (v *Var) UnmarshalYAML(node *yaml.Node) error {
|
||||
if experiments.MapVariables.Enabled {
|
||||
if experiments.MapVariables.Enabled() {
|
||||
|
||||
// This implementation is not backwards-compatible and replaces the 'sh' key with map variables
|
||||
if experiments.MapVariables.Value == "1" {
|
||||
|
||||
@@ -64,7 +64,7 @@ func NewNode(
|
||||
|
||||
}
|
||||
|
||||
if node.Remote() && !experiments.RemoteTaskfiles.Enabled {
|
||||
if node.Remote() && !experiments.RemoteTaskfiles.Enabled() {
|
||||
return nil, errors.New("task: Remote taskfiles are not enabled. You can read more about this experiment and how to enable it at https://taskfile.dev/experiments/remote-taskfiles")
|
||||
}
|
||||
return node, err
|
||||
|
||||
Reference in New Issue
Block a user