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 command not found in GitBash #5091

Closed
josephgodwinkimani opened this issue Mar 22, 2016 · 5 comments

Comments

@josephgodwinkimani
Copy link

commented Mar 22, 2016

I have C:\Composer\ in System PATH variables.

I use gitbash v2.7.12

When I run this command:

php composer.phar -V (1.0.0-alpha1)

OR

composer -V (1.0.0-alpha1)

I get this output:

bash: composer: command not found

And I expected this to happen:


 ✘ ಠ︵ಠ凸[20:22:03]-<pid|⚑167>13022010*>>@SERVER:/c$ composer -V
 Composer version 1.0.0-alpha11 2015-11-14 16:21:07

 ✘ ಠ︵ಠ凸[20:22:06]-<pid|⚑168>13022010*>>@SERVER:/c$

I even tried to add export PATH=$PATH:/c/composer/ in my bashrc but it didnt work! Although in Windows Command Prompt it workd like a charm.

@josephgodwinkimani josephgodwinkimani changed the title composer -V command not found in GitBash composer command not found in GitBash Mar 23, 2016
@garethellis36

This comment has been minimized.

Copy link

commented Mar 26, 2016

What is in C:\Composer\? If you cd /c/composer/ in Git Bash, can you run composer -v?

@josephgodwinkimani

This comment has been minimized.

Copy link
Author

commented Mar 26, 2016

when i cd to composer and run composer -v it doesnt work. I have tried with different versions of gitbash ( v2.7.12, v.2.7.4). what is in c:\composer is composer.phar and composer.bat

@garethellis36

This comment has been minimized.

Copy link

commented Mar 26, 2016

You can't run .bat files in Git Bash, so Git Bash is looking for a file called "composer", which doesn't exist. You could rename composer.phar to just composer and it would work in Git Bash.

I would personally recommend deleting the whole folder and reinstalling composer using the official installer. This will take care of setting your PATH correctly.

@Bradltr95

This comment has been minimized.

Copy link

commented Mar 19, 2019

Renaming the file did not seem to do anything as you get composer and composer.phar with the install. You will need to delete and re-install composer from their website using the Composer-Setup.exe

@AmitPatelAlbiorix

This comment has been minimized.

Copy link

commented Oct 10, 2019

Composer-Setup.exe move download folder to Desktop then install otherwise not getting system variable and not install in c:/programmefile/ folder .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.