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

Version information is sent to STDERR #472

Closed
tomncooper opened this issue Jun 22, 2020 · 2 comments
Closed

Version information is sent to STDERR #472

tomncooper opened this issue Jun 22, 2020 · 2 comments
Labels
Milestone

Comments

@tomncooper
Copy link

yq --version sends the version string output to standard error, which makes it harder to write scripts to check the installed version number.

version of yq: 3.3.2
operating system: Linux

This may be linked to the changes to address #440. It is not blocker but it means you need to use something like:

yq --version 2> >(grep -Po '\d.\d.\d')

Instead of the typical:

yq --version | grep -Po '\d.\d.\d' 

So scripts that used the later will stop working after an updated to 3.3.1+

@mikefarah
Copy link
Owner

yep - unintended side effect sorry! Will look into this.

@mikefarah mikefarah added this to the 3.4 milestone Sep 13, 2020
@mikefarah
Copy link
Owner

edobry added a commit to edobry/chitin that referenced this issue Aug 16, 2023
yq fix

This PR fixes an issue with the `yq` version detection logic; as of a recent version, `yq` incorrectly sends version information to `stderr` instead of `stdout`, breaking our init script. To account for this until the issue is fixed, we redirect `stderr` to `stdout`.

See: mikefarah/yq#472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants