Comments (10)
Can you please run in your ssh above given command using sudo?
from prompts.
Can you please run in your ssh above given command using sudo?
from prompts.
I have a branch that will automatically trigger the fallback when the stty
command fails. Will push it up soon.
from prompts.
from prompts.
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.
Hi @jessarcher,
Thanks for the answer.
Yes, I'm connecting SSH to a Linux machine.
from prompts.
May be stty mode set at that time ssh permission required.
sudo stty -icanon -isig -echo
Then
stty -g
from prompts.
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'.
This resolved it very well:
\Laravel\Prompts\Prompt::fallbackWhen(true);
Thank you all.
from prompts.
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.
Somehow this is implemented, maybe it needs some more checks.
from prompts.
Related Issues (20)
- Can remove breaklines after text output HOT 1
- Press any key to continue? HOT 3
- Allow easy selection of output interface (stdin/stderr) HOT 1
- allow select/multiselect to be settable with a parameter HOT 2
- Long options break search options HOT 2
- Long options break `multisearch` options HOT 3
- Feature request: section support HOT 3
- Select Prompt does not work correctly with associative array HOT 10
- Rendering issue with long confirm labels HOT 4
- Validation message cut off at the last character. HOT 4
- Investigate reducing terminal height requirements HOT 1
- Track typed value on Multiselect and Select HOT 12
- STDIN complain HOT 2
- Allow spinners to be marked as "done" and persist in the UI. HOT 3
- schedule:test does not print any output when running inside a php debian docker image HOT 13
- Debounce with search() HOT 3
- Number 0 key in text field causes 'Uninitialized string offset 0' exemption in TypedValue.php HOT 3
- character "❯" cant show on windows HOT 1
- support anticipate UI like text() HOT 4
- SelectPrompt $required is not allowed to be false HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prompts.