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 output goes to stderr instead of stdout #537

Closed
Alexhha opened this issue Sep 16, 2020 · 2 comments
Closed

version output goes to stderr instead of stdout #537

Alexhha opened this issue Sep 16, 2020 · 2 comments
Labels
Milestone

Comments

@Alexhha
Copy link

Alexhha commented Sep 16, 2020

Describe the bug
It's not a common practice to use STDERR for such things

version of yq: 3.3.4
operating system: CentOS7

Command
The command you ran:

$ yq --version

Actual behavior

$ yq --version > test.txt
$ cat test.txt

Expected behavior

$ yq --version > test.txt
$ cat test.txt
yq version 3.3.4

Additional context
Add any other context about the problem here.

@Alexhha Alexhha added the bug label Sep 16, 2020
@Alexhha
Copy link
Author

Alexhha commented Sep 16, 2020

BTW

yq 3.3.0 use STDOUT, but 3.3.1 use STDERR

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

alexgg added a commit to product-os/versionist that referenced this issue May 24, 2021
yq versions before 3.4.0 output the version information to stderr

mikefarah/yq#537

This patch redirects stderr to stdout.

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
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