Skip to content

Error in RHS hidden by Pipe #2422

Open
Open
@ryenus

Description

@ryenus

Describe the bug
Not really a functional bug, rather this is about how error handling is done. Ideally the error occurred deeper in the call stack shouldn't be shadowed away

Version of yq: v4.46.1
Operating system: mac
Installed via: homebrew

Command
The command you ran:

yq -n 'tz()'       ## Error: 'tz' expects 1 arg but received none
yq -n 'now | tz()' ## Error: '|' expects 2 args but there is 1

Actual behavior

With now | tz(), the error reported is about missing arg for |

Expected behavior

With now | tz(), the error reported should be about missing arg for tz

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions