-
Notifications
You must be signed in to change notification settings - Fork 323
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
[feature request] add option for gum spin
to dump output on error
#55
Comments
Hey @jackmac92, I think this is a really great idea. Let me/us think a little bit more about it / how to implement it (default behaviour vs opt-in, etc...). Thanks for sharing the |
Also, if you want a quick and dirty version of this functionality while we think about it, you can do this (on
This will only display the |
I'm piggybacking a little, but I'm realizing that this is close to what I want. I want to display a gum spinner while I run a long-running process whose output I want/need. That is, I'm trying something like:
What I really want is to display a spinner while someLongCommand writes its output to a file. So, would there perhaps be a flag to also allow the output to pass through? Or to add a --output-to-file option or something? |
@chrisfromredfin That should work but you need to use the |
Yes but it also redirects the output of the spinner to the top of the file…
…--
Christopher J. Wells
Redfin Solutions, LLC
office: 908-4-DRUPAL
fax: 207-292-1414
***@***.***
www.redfinsolutions.com
On Aug 26, 2022, 5:48 PM -0400, Maas Lalani ***@***.***>, wrote:
@chrisfromredfin That should work but you need to use the --show-output to redirect the output to the file (also make sure you're on the latest version of gum)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Ah sorry, I think the change that fixes this is not on @chrisfromredfin I think if you build on the latest code (including this commit: 4e61c12), the spinner will not be included in the file. We will likely make a new release soon. |
Yes, just confirming that with a HEAD build it works! Excited for a new release. :) |
This makes it so that if the `--show-error` flag is provided then the full output of the command will be printed if the command fails. This kind of works in conjuncture with `--show-output` in that if the command succeeds only STDOUT is pushed. If the command fails both `STDOUT` and `STDERR` are pushed. This builds off of charmbracelet#371 Resolves charmbracelet#55
This makes it so that if the `--show-error` flag is provided then the full output of the command will be printed if the command fails. This kind of works in conjuncture with `--show-output` in that if the command succeeds only STDOUT is pushed. If the command fails both `STDOUT` and `STDERR` are pushed. This builds off of charmbracelet#371 Resolves charmbracelet#55
… (#518) * feat(spin): Add support for `--show-error` for the spinner. This makes it so that if the `--show-error` flag is provided then the full output of the command will be printed if the command fails. This kind of works in conjuncture with `--show-output` in that if the command succeeds only STDOUT is pushed. If the command fails both `STDOUT` and `STDERR` are pushed. This builds off of #371 Resolves #55 * chore: Fix formatting --------- Co-authored-by: Elliot Courant <me@elliotcourant.dev>
I think it would be great if
gum spin
could act as a prettier version of chronic, which hides the output unless an error occursThe text was updated successfully, but these errors were encountered: