1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

feat: support multiple experiment values

This commit is contained in:
Pete Davison
2023-12-23 02:33:12 +00:00
parent f6a24fe925
commit dfe39bfb5d
4 changed files with 44 additions and 18 deletions

View File

@@ -80,7 +80,7 @@ type Var struct {
}
func (v *Var) UnmarshalYAML(node *yaml.Node) error {
if experiments.AnyVariables {
if experiments.AnyVariables.Enabled {
var value any
if err := node.Decode(&value); err != nil {
return err

View File

@@ -30,7 +30,7 @@ func NewNode(
// If no other scheme matches, we assume it's a file
node, err = NewFileNode(uri, opts...)
}
if node.Remote() && !experiments.RemoteTaskfiles {
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