Skip to content

Injecting props via CLI args does not work #4479

Open
@preslavgerchev

Description

@preslavgerchev

Describe the bug
Injecting the props for a given MQL query does not seem to work via the --props flag.

To Reproduce
Run the following pack:

packs:
  - uid: test
    name: test
    groups:
      - filters: 
        - mql: | 
            asset.platform == 'macos'
        queries:
        - uid: test-prop
queries:
  - uid: test-prop
    title: Inject the package name and check it
    props:
      - uid: name
        title: The package name
        mql: |
          return "iMovie"
    mql: |
      packages.where(name == props.name) {name version}
cnquery scan -f test.yaml --output json

You can see the right output (packages are being filtered, output shows iMovie)

Now run with the --props arg:

cnquery scan -f test.yaml --props "name='zoom-us'" --output json

The output is still the same

Expected behavour
Package name becomes zoom-us and results are different

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions