mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
feat: add a new .taskrc.yml to enable experiments (#1982)
This commit is contained in:
@@ -22,7 +22,7 @@ func (v *Var) UnmarshalYAML(node *yaml.Node) error {
|
||||
if experiments.MapVariables.Enabled() {
|
||||
|
||||
// This implementation is not backwards-compatible and replaces the 'sh' key with map variables
|
||||
if experiments.MapVariables.Value == "1" {
|
||||
if experiments.MapVariables.Value == 1 {
|
||||
var value any
|
||||
if err := node.Decode(&value); err != nil {
|
||||
return errors.NewTaskfileDecodeError(err, node)
|
||||
@@ -43,7 +43,7 @@ func (v *Var) UnmarshalYAML(node *yaml.Node) error {
|
||||
}
|
||||
|
||||
// This implementation IS backwards-compatible and keeps the 'sh' key and allows map variables to be added under the `map` key
|
||||
if experiments.MapVariables.Value == "2" {
|
||||
if experiments.MapVariables.Value == 2 {
|
||||
switch node.Kind {
|
||||
case yaml.MappingNode:
|
||||
key := node.Content[0].Value
|
||||
|
||||
Reference in New Issue
Block a user