Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Incorrect Installer Output (on success) #638

Closed
wilmoore opened this Issue · 4 comments

2 participants

@wilmoore

Command:

curl -s http://getcomposer.org/installer | php -- --install-dir=bin

Desired Output:

Use it: php bin/composer.phar

Current Output:

Use it: php composer.phar
@wilmoore

One problem I see in even opening this can of worms is:

curl -s http://getcomposer.org/installer | php -- --install-dir=bin

Output:

Use it: php /Users/whomever/projects/SweetProject/bin/composer.phar

The above could be fixed given we know it is a relative path; however, what about this:

curl -s http://getcomposer.org/installer | php -- --install-dir=/fully/qualified/path/to/bin

Output:

Use it: php /fully/qualified/path/to/bin/composer.phar

My proposal is to check for relative vs. qualified path and:

  1. grab a copy of $installDir to be used only for output purposes
  2. if relative, drop prefix of getcwd() from output version of $installDir
  3. if qualified, do nothing (use as-is)
@Seldaek
Owner

Why 3? I'd just say we output $installDir/composer.phar because that'll always work, if it looks ugly so it goes, don't pass it long absolute paths :)

@Seldaek
Owner

Fixed

@Seldaek Seldaek closed this
@wilmoore

Tested...works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.