Closed jasonvarga closed 5 months ago
This isn't really a bug of Prompts, more a side-effect of how Forge reads the deployment output. During a deployment, Forge pipes output to a file which the CLI reads via the API. Writing to files means that there is no support for the interactive or ANSI codes that replace the spinner in situ.
When running any interactive commands like this, I'd recommend adding the --no-progress
or --no-ansi
options.
@jbrooksuk --no-progress
doesn't seem to be an allowed flag, and --no-ansi
doesn't seem to have any affect when testing this in Laravel Forge
@DanielDarrenJones when you say --no-ansi
doesn't have any effect, what happens?
@jbrooksuk It still outputs the spinner and a new line every time in the deployment log
Laravel Prompts Version
0.1.23
Laravel Version
11.9.1
PHP Version
8.3.7
Operating System & Version
Ubuntu
Terminal Application
Forge
Description
When using a command with
spin()
in Forge's deployment script, the output in Forge's logs shows a line for every "frame" of the spin.This doesn't happen when ssh'ing in and running the command manually. The spinner works fine.
I'm not sure where the issue really lies. In our implementation, Laravel's setup of Prompts, or Forge.
Our implementation code is quite simple:
Steps To Reproduce
spin()
to the deployment script