-
Notifications
You must be signed in to change notification settings - Fork 276
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
[5.x] Run commands inside the spin
function.
#340
base: master
Are you sure you want to change the base?
Conversation
The spinner can also be used without the pcntl extension installed, as it will render a static spinner in this case: https://github.com/laravel/prompts/blob/main/src/Spinner.php#L50-L52 I would personally prefer it if the message would give a hint at what's currently being installed. Right now it just always says "Installing…" and the user doesn't know what's happening. Also when some of the commands fail, they fail silently. For example when trying to install NPM dependencies for Breeze with an unsupported Node/NPM version. |
I did notice that for the Spinner but I think on the case of the installer it makes more sense to only use it when we have the non-static version. For the showing what is currently being installed, I did though about that, but I think we can work on that on a future PR after this one. For the next one, I would divide each command into its own process, and for that case we can have better error messages and we can say "npm install", "composer install", etc. Thanks for the review @mpociot. |
@xiCO2k awesome - glad you sent this over.
Can we go ahead and do this before merging? |
On it!!! |
@mpociot can you give it a try and let me know what you think? Thanks. |
spin
function.spin
function.
@xiCO2k some conflicts here. |
Yep will handle it this afternoon |
ready @taylorotwell |
Drafting this for a bit while I think about it. |
Unpopular opinion: seeing the "behind the scenes" of installing dependencies is helpful to get familiar with the ecosystem, and allows them to see the progress or when it gets stuck due to the network. |
This PR adds the capability to have the
spin
function from Laravel Prompts.New vs Old
installer-spin.mov
And of course you can still pass the
-v
and have the exact same output as before.Cheers.