Comments (14)
Thanks both!
I'm struggling to figure out what's going on here. The code that triggers that error should only execute if stream_isatty(STDIN)
is false
.
I'm just setting up a Windows machine to try to replicate this.
from installer.
I have same error in Mac
i use sail https://laravel.com/docs/10.x/installation#sail-on-macos
from installer.
Hey @sixtusagbo,
What operating system are you running the laravel new
command on?
from installer.
Windows 10 Version 22H2 (OS Build 19045.3448)
from installer.
Thanks @sixtusagbo,
Are you able to give me the results of this command:
php -r "var_dump(stream_isatty(STDIN));"
(I'm not sure if it should be php.exe
instead of just php
)
from installer.
Just php is okay, anyone can work. I use mingw on bash.
The result of that command is bool(true)
from installer.
I've had the same issue as @sixtusagbo mentioned.
Is it solved ?
from installer.
Hi @iyefreedy,
Not yet. Could you please tell me your operating system and the result of running the command from #286 (comment).
from installer.
This is the result of the command.
And I am using Windows 10 Education 64-bit operating system (10.0, Build 190454)
from installer.
@iyefreedy are you also using mingw on bash? Or something different?
from installer.
I've replicated the issue.
Very strange behaviour. The stream_isatty
function returns differently depending on whether you execute the script directly, or pass it as an argument to php
.
Take the following test.php
file for example:
#!/usr/bin/env PHP
<?php
var_dump(stream_isatty(STDIN));
And note the different result depending on how you execute it:
$ php test.php
bool(true)
$ ./test.php
bool(false)
While I look into this, you can run the installer with the -n
flag to make it non-interactive. E.g.:
laravel new example-app -n
from installer.
This is caused by mintty and its use of a pipe instead of a TTY.
php
is aliased to wintty php.exe
, which is why that works. php.exe
is not aliased, nor are scripts with a shebang, so those don't work.
I can't find a reliable way to detect whether STDIN
is interactive when using mintty so I need to re-think the approach for non-interactive mode in https://github.com/laravel/prompts.
The easiest solution for the time being is probably just to make the fallback mode take priority over the non-interactive mode. An alternative would be to force interactive mode when mintty
is used without wintty
, but this would still cause issues when mintty
is not actually interactive.
from installer.
Try again all?
from installer.
LGTM (after composer global update
)
from installer.
Related Issues (20)
- "globally installing the Laravel installer via Composer" $PATH issue? HOT 2
- Installer doesn't setup scaffolding for inertia ssr when combined by typescript option HOT 1
- Using the --dev switch produces an unresolvable composer.json file. HOT 1
- Option --branch isn't working HOT 3
- Not installing usable Jetstream + Livewire scaffolding HOT 1
- Docs link broken/missing from docs HOT 2
- Error installing Laravel on a Github Codespace (it worked yesterday 2023-12-18) HOT 4
- Call to `http://cabinet.laravel.com/*.zip` is returning a 404 HOT 11
- Add check to installer to see if you're on the latest version
- Database option HOT 1
- Incorrect version of the Pest package HOT 5
- issues when install laravel with mysql HOT 3
- [11.x] The config files are back in the skeleton HOT 2
- Laravel 11 laravel/installer 5.6 not tagged HOT 1
- Removing unnecessary migration prompt when database connection settings are not configured HOT 1
- Option to select database type from command line HOT 1
- Database name is set to directory even with an actual DBMS set in options HOT 2
- Database.sqlite is created even if you slect mysql HOT 1
- breeze installs breeze without --dev flag HOT 1
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 installer.