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

progress: export stdout so it can be overridden by ubuntu-image #12025

Closed
wants to merge 2 commits into from

Conversation

jawn-smith
Copy link
Contributor

ubuntu-image has a --quiet flag that should suppress all output besides error messages. This is done per the Ubuntu CLI tool guidelines

When calling image.Prepare, there are two default outputs: "Fetching <snap_name>", and a progress bar for the download of the snap. The variable Stdout is already exported for the image package that prints the "Fetching" message. This PR exports the Stdout variable for the progress package as well so the progress bar can also be suppressed.

@sergiocazzolato sergiocazzolato changed the title progress: Export Stdout so it can be overridden by ubuntu-image progress: export stdout so it can be overridden by ubuntu-image Aug 9, 2022
@pedronis pedronis added the Needs Samuele review Needs a review from Samuele before it can land label Aug 10, 2022
@pedronis pedronis self-requested a review August 10, 2022 09:30
Copy link
Contributor

@mardy mardy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@pedronis
Copy link
Collaborator

@jawn-smith I think it would be cleaner if we made the ToolingStore used by Prepare use image.Stdout instead. So there is only one Stdout to switch before calling Prepare. I need to touch the ToolingStore anyway in the next couple of days, so I can try to work this in too.

@pedronis
Copy link
Collaborator

@jawn-smith I opened #12047

@pedronis
Copy link
Collaborator

closing this in favor of #12047

@pedronis pedronis closed this Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛔ Blocked Needs Samuele review Needs a review from Samuele before it can land
Projects
None yet
3 participants