Skip to content
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

Prioritize fallback over non-interactive mode #91

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

jessarcher
Copy link
Member

@jessarcher jessarcher commented Sep 29, 2023

This PR solves an obscure Windows issue when using mintty without wintty, which causes stream_isatty(STDIN) to incorrectly return false, which triggers non-interactive mode.

This can occur when using "Git Bash" (which uses mintty under the hood) without the php CLI alias. I.e when prefixing a script with php.exe instead of php, or when directly executing a PHP script with a shebang (like the Laravel installer).

I can't find a reliable way to determine whether STDIN is interactive or not in this scenario because mintty simulates a TTY by using a pipe, which is typically not interactive. The most reliable workaround I can think of for the time being is to make the Windows fallback take precedence over non-interactive mode. We could alternatively force-enable interactive mode when using mintty without wintty, but I'm not sure if there is a scenario where this would be genuinely non-interactive.

Fixes laravel/installer#286

@driesvints driesvints merged commit 37ed55f into main Sep 29, 2023
6 checks passed
@driesvints driesvints deleted the mintty-fix branch September 29, 2023 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation not working
2 participants