In scenarios where the fallbackWhen condition is false, but the stty command fails, the prompt will still attempt to render but is unlikely to work correctly.
This has been reported when SSHing into a Linux machine from a Windows terminal, where the environment detection will report a supported environment, but the stty command cannot set the appropriate terminal modes. (Note: This may be due to shared hosting permissions rather than Windows - See https://github.com/laravel/prompts/issues/62#issuecomment-1713052440.)
This PR updates Prompts to enable the fallback when the stty command fails. I have configured it to still output the stty error message in case it can be resolved, but it will only output it once, before the first prompt.
I've also improved the error message when no fallback has been registered for users on old Laravel versions or not using Laravel at all. #57 should improve this.
In scenarios where the
fallbackWhen
condition is false, but thestty
command fails, the prompt will still attempt to render but is unlikely to work correctly.This has been reported when SSHing into a Linux machine from a Windows terminal, where the environment detection will report a supported environment, but the
stty
command cannot set the appropriate terminal modes. (Note: This may be due to shared hosting permissions rather than Windows - See https://github.com/laravel/prompts/issues/62#issuecomment-1713052440.)This PR updates Prompts to enable the fallback when the
stty
command fails. I have configured it to still output thestty
error message in case it can be resolved, but it will only output it once, before the first prompt.I've also improved the error message when no fallback has been registered for users on old Laravel versions or not using Laravel at all. #57 should improve this.
Fixes #62