Giter Club home page Giter Club logo

Comments (10)

utsavsomaiya avatar utsavsomaiya commented on September 3, 2024 1

Can you please run in your ssh above given command using sudo?

from prompts.

maPer77 avatar maPer77 commented on September 3, 2024 1

Can you please run in your ssh above given command using sudo?

image

from prompts.

jessarcher avatar jessarcher commented on September 3, 2024 1

I have a branch that will automatically trigger the fallback when the stty command fails. Will push it up soon.

from prompts.

maPer77 avatar maPer77 commented on September 3, 2024

image
image

from prompts.

jessarcher avatar jessarcher commented on September 3, 2024

Hi @maPer77,

Just to be clear, are you SSHing into a Linux machine before running php artisan migrate?

Prompts don't currently work on Windows due to platform limitations, so we configure Prompts in Laravel to fall back to Symfony prompts. If you are SSH'd into a Linux machine, the current platform detection will detect Linux and not fall back. The platform limitations relate to how we can control the terminal's behaviour using the stty command. From your screenshot, it looks like the stty exists in your environment, but it has failed, which will prevent Prompts from being able to intercept your key presses. This may be due to using a Windows terminal, but I'm not sure.

I will try to replicate the above scenario and see whether I can either fix it, or update the fallback behaviour.

In the meantime, you can configure additional scenarios when Prompts fall back using the fallbackWhen method in the boot method of your AppServiceProvider.php file. In your case, you may want to configure Prompts to always fall back when your application is in production:

\Laravel\Prompts\Prompt::fallbackWhen(app()->isProduction());

Or you can always fall back:

\Laravel\Prompts\Prompt::fallbackWhen(true);

from prompts.

maPer77 avatar maPer77 commented on September 3, 2024

Hi @jessarcher,
Thanks for the answer.
Yes, I'm connecting SSH to a Linux machine.

from prompts.

utsavsomaiya avatar utsavsomaiya commented on September 3, 2024

May be stty mode set at that time ssh permission required.

sudo stty -icanon -isig -echo

Then

stty -g

@jessarcher ?

from prompts.

maPer77 avatar maPer77 commented on September 3, 2024

Hi @utsavsomaiya

I believe what is happening is that I am connected to shared hosting, I do not have permission for some things, it seems that one of those things is 'stty'.

image

This resolved it very well:
\Laravel\Prompts\Prompt::fallbackWhen(true);

Thank you all.

from prompts.

maPer77 avatar maPer77 commented on September 3, 2024

The ideal would be for 'Prompt' to identify that 'stty' cannot be loaded and switch to fallback automatically. I don't know if this would be possible, it would prevent other people from having this same problem.

from prompts.

maPer77 avatar maPer77 commented on September 3, 2024

Somehow this is implemented, maybe it needs some more checks.

image

from prompts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.