How to initialize a Composer project in Git Bash?

Viewed 1397

I am trying to initialize a composer project for the first time via Git Bash. But when I run the command "composer init" in the desired directory I get the following error:

[RuntimeException]
You have to run this command in interactive mode, or specify at least some data using --name, --require, etc.

Screenshot from error in Git Bash

In the Windows command line it does work but as Git Bash is my main command line I would like to do it through there. Does anybody have an idea how to fix this problem? I've also tried to initialize a project with npm which worked fine.

1 Answers

As a workaround, I can composer init through Visual Studio terminal, even if it fails within Git Bash.

Related