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

cmd: send version info to stdout #1660

Merged
merged 3 commits into from
May 5, 2021
Merged

cmd: send version info to stdout #1660

merged 3 commits into from
May 5, 2021

Conversation

acud
Copy link
Member

@acud acud commented May 5, 2021

This PR sends the bee version command output to stdout. cobra defaults to stderr if output is not explicitly set.

fixes #1648


This change is Reviewable

@acud acud self-assigned this May 5, 2021
@acud acud added the ready for review The PR is ready to be reviewed label May 5, 2021
Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @aloknerurkar and @esadakar)

Copy link
Member

@istae istae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aloknerurkar)

Copy link
Member

@istae istae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aloknerurkar)

Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @acud and @aloknerurkar)


cmd/bee/cmd/version.go, line 23 at r1 (raw file):

		},
	}
	v.SetOut(os.Stdout)

Replace os.Stdout with c.root.OutOrStdout() and this will fix also the failing TestVersionCmd test.

@mrekucci mrekucci requested a review from istae May 5, 2021 15:14
Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @aloknerurkar and @esadakar)

Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aloknerurkar)

@acud acud merged commit 4c74b59 into master May 5, 2021
@acud acud deleted the fix-version-stout branch May 5, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull-request ready for review The PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bee prints version to the stderr
4 participants