Skip to content

eval output variables always fully namespaced #80

@zerog2k

Description

@zerog2k

eval always namespaces the variable names, regardless of jmespath selection scope

bash-3.2$ cat test.yml
foo:
  bar:
    baz: "something"
bash-3.2$ python3 -m niet . test.yml 
foo:
  bar:
    baz: something

bash-3.2$ python3 -m niet . test.yml -f eval
foo__bar__baz="something"
bash-3.2$ python3 -m niet .foo.bar test.yml
baz: something

bash-3.2$ python3 -m niet .foo.bar test.yml -f eval
foo_bar__baz="something"
bash-3.2$ 

i.e. expected output for:

python3 -m niet .foo.bar test.yml -f eval

would be

baz="something"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions