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

Composer init is failing without any reason. #7056

Closed
brunoczim opened this issue Jan 29, 2018 · 7 comments
Closed

Composer init is failing without any reason. #7056

brunoczim opened this issue Jan 29, 2018 · 7 comments

Comments

@brunoczim
Copy link

@brunoczim brunoczim commented Jan 29, 2018

Output of composer diagnose:

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.6.2
PHP version: 7.0.27-0+deb9u1
PHP binary path: /usr/bin/php7.0

When I run this command:

bruno@debian:~/Documents/php/tester/testpkg$ composer init

I get the following output:


                                            
  Welcome to the Composer config generator  
                                            


This command will guide you through creating your composer.json config.

Package name (<vendor>/<name>) [bruno/testpkg]: 
                                                          
  [Symfony\Component\Console\Exception\RuntimeException]  
  Aborted                                                 
                                                          

init [--name NAME] [--description DESCRIPTION] [--author AUTHOR] [--type [TYPE]] [--homepage HOMEPAGE] [--require REQUIRE] [--require-dev REQUIRE-DEV] [-s|--stability STABILITY] [-l|--license LICENSE] [--repository REPOSITORY]

And I expected this to happen:

Package name (<vendor>/<name>) [bruno/testpkg]: <me entering some input>
... etc

The directory is empty.
ls -mod outputs: drwxr-xr-x 2 bruno 4096 Jan 29 12:27 .

@brunoczim

This comment has been minimized.

Copy link
Author

@brunoczim brunoczim commented Jan 29, 2018

It seems like creating a new session in the terminal fixes the problem, but I have no idea why.

@glensc

This comment has been minimized.

Copy link
Contributor

@glensc glensc commented Jan 30, 2018

did it abort immediately when it was supposed to wait for terminal input? https://asciinema.org/ recording could show timing better.

@Seldaek

This comment has been minimized.

Copy link
Member

@Seldaek Seldaek commented Jan 31, 2018

@brunoczim can you reliably reproduce it or was it a one off and restarting the terminal fixed it for good?

@efimov90

This comment has been minimized.

Copy link

@efimov90 efimov90 commented Dec 1, 2019

Same error 1.9.1 (stable channel), php 7.4.0 ( NTS Visual C++ 2017 x64 )

@Steve51D

This comment has been minimized.

Copy link

@Steve51D Steve51D commented Dec 2, 2019

I get the same error on the same versions.
Fresh install of PHP and composer. (Windows 10)
When I run composer init I get:

  Welcome to the Composer config generator



This command will guide you through creating your composer.json config.

Package name (<vendor>/<name>) [****]:

  [Symfony\Component\Console\Exception\RuntimeException]
  Aborted

Restarting the terminal does not help. I also tried reinstalling and running as admin but no luck. Not sure what else to try.

@stof

This comment has been minimized.

Copy link
Contributor

@stof stof commented Dec 2, 2019

PHP 7.4.0 for windows has a bug breaking the QuestionHelper (it does not block until you write the input when reading from STDIN). Until PHP releases the fix (a PR is already in progress for it), you should switch back to PHP 7.3.

@stof

This comment has been minimized.

Copy link
Contributor

@stof stof commented Dec 2, 2019

That issue is a duplicate of #8457

@Seldaek Seldaek closed this Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.