-
Notifications
You must be signed in to change notification settings - Fork 94
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
Spinner runs $callback()
twice if statically rendered
#65
Comments
My temp fix locally was just to set |
It looks like a I couldn't replicate your exact scenario, though. For me, it has a fatal error when it erroneously tries to call |
I guess the reason it would do that though is due to the Now time to modify my class on my local version. Thanks so much for being so fast to respond! Love the work you have done here, and already tinkering with the themes and everything. :) |
Oh, understood! If you're manually triggering the static mode, then I guess #66 won't help - depending on how you're doing it. I'm currently working on a "non-interactive" mode for Prompts - mostly to prevent prompting for user input when it's not an interactive terminal session, without needing to fall back to Symfony. We could look at changing the spinner behaviour when non-interactive as well. |
Laravel Prompts Version
0.1.6
Laravel Version
10.1.2
PHP Version
8.1.4
Operating System & Version
Ubuntu 20.04 via WSL
Terminal Application
Windows Terminal
Description
First time bug submitter for OSS, if I need to add any more detail let me know!
When using Spinner (not documented yet, found when viewing source) if rendered statically, it will run
$callback()
twice.It appears in the
Spinner.php
class, in thespin()
method it calls it here:And then regardless if it ran via the
renderStatically()
method, it will run it again in thetry
block.Steps To Reproduce
Create a spinner, and have it call statically. Add a
echo
to the function called, and it will write it to terminal twice if the spinner is rendered statically, only once if rendered normally.The text was updated successfully, but these errors were encountered: