Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An argument to fallback to plain text if invalid input #1975

Open
andreif opened this issue Mar 11, 2024 · 2 comments
Open

An argument to fallback to plain text if invalid input #1975

andreif opened this issue Mar 11, 2024 · 2 comments

Comments

@andreif
Copy link

andreif commented Mar 11, 2024

Please describe your feature request.

Sometimes commands that output YAML can produce extra warnings that stop yq from showing what was the original output. It would be great to optionally dump the raw output in such cases so we don't have to use workarounds for that.

Describe alternatives you've considered

Temp files and variables could work but having a simple arg (like debug etc.) to achieve this would be so much easier and concise.

Additional context

Example: AWS CDK CLI run can result in an error and piping to yq directly makes it impossible to see what went wrong.

@andreif
Copy link
Author

andreif commented Mar 11, 2024

Highlighting the valid part of the output would be a dream.

@andreif
Copy link
Author

andreif commented Mar 11, 2024

I.e. replacing

cdk synth | tee _ | yq -P || cat _; rm _

with

cdk synth | yq -P --debug
cdk synth | yq -P -d
cdk synth | yq -Pd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant