-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add --quiet or --no-progress-bars to spfs commit and push #1022
Comments
I can see where the Sync args create a Or, we could have the Or, option 3, we make a new |
I would actually love maybe a version of the reporter that can show some minor progress information (rather than sitting silently until it finishes) but also not use progress bars for the reason that you mentioned. I'm curious about the situation here because realistically it should be overwriting data, and also shouldn't be showing progress bars if stdin is not a proper tty... Maybe we are either not using it quite right or something is up in the API. Is this behaviour being seen in the latest version of spfs? |
Yes, I can get this behaviour in the latest spk/spfs builds. I've done some more digging and the problem appears whenever stdout is redirected. You can run any command spk or spfs that involves a sync, which produces progress bars, e.g.
The progress bar appears to be going to stderr and if just stdout is redirected that messes with the terminal contents. However, if you redirect stderr as well, to a file or pipe, then the progress bars are automatically hidden and the terminal contents remain uncleared. I started doing some |
Even though (we think, it's being tested in production) the screen clearing/redirect problem has gone away, users are asking for an option to hide the progress bars. So I've reopened this so we can look at adding a --quiet or --no-progress-bars option to the |
Is your feature request related to a problem? Please describe.
Some spfs commands use console/text based progress bars. The progress bars seem, to clear the console as a side-effect.
spfs commit
andspfs push
are examples of where this happens.Users have found, when those commands are used in scripts, either directly or indirectly (e.g. from an application launcher, or renderfarm job launcher), useful output from other parts of the script is lost. It is cleared away by the console clearing that happens as part of the progress bar display. Losing key parts of their script's output annoying and ideally they'd like it to stop, or have an option stop it happening.
Describe the solution you'd like
Add
--quiet
or--no-progress-bars
option tospfs commit
andspfs push
commands (and perhaps others with console clearing progress bars) to not output progress bars, or not clear the console/terminal window when using them, or similar. Then people, scripts, and tools have the option of seeing the progress bars or not.The text was updated successfully, but these errors were encountered: