phar-io / phive

The Phar Installation and Verification Environment (PHIVE)
https://phar.io
BSD 3-Clause "New" or "Revised" License
579 stars 43 forks source link

Add config command to change the default tools directory #61

Open sebastianheuer opened 8 years ago

sebastianheuer commented 8 years ago

By running phive config set toolsDirectory bin (actual syntax tbd), the default tools directory in the project's phive.xml should be set to the given value. Setting this for all future projects will be subject of another issue.

sgohl commented 5 years ago

I am in need of this feature too. It would be convenient to be able to set this via environment variable. This way, it would be perfectly usable in Docker Images.

omawnakw commented 4 years ago

PHIVE is so much uglier than now removed phpbrew app (AppStore):

theseer commented 4 years ago

PHIVE is so much uglier than now removed phpbrew app (AppStore):

I have no idea what phpbrew app is but the tonality of this statement is not exactly helpful.

* Default installation path in README is /usr/local/bin/. To me it would be much better to install to ~/.bin or even ~/.phar/bin and add it to $PATH.

Wrong. The default is to perform a project level installation, which defaults to $cwd/tools. What you refer to are paths that could be used for global installations.

According to the posix standard, local non-os-controlled installations are to be placed in /usr/local or /opt. Given that /usr/local/bin is in the $PATH in most systems for regular users by default, this is the location to put binaries. I do not see any reason to install things into the home directory of the user by default. We can discuss if there's a point in having a "home" mode, where things are installed in $HOME/bin or alike.

* Default installation in README requires wget -- to me it's better to add alternative curl method as other tools  such as phprew or brew do

Seriously?

* If you break the installation process with Ctrl+C PHIVE breaks with this message at next run:
  _Rename internal storage file from phars.xml to registry.xml_
  and requires to run `mv ~/.phive/phars.xml ~/.phive/registry.xml` manually. At least it should print this command on screen to copy-paste not forcing user to search where this files located and type it manually

I don't see how this is related to the location of the tools directory. It's an interesting bug though.

* without "global" option it installs to ~/tools - this adds garbage to $HOME and does not look like good practice. To me it's better to put them to ~/.bin/ or ~/.phive/bin or ~/.phive/tools and ad them to $PATH or at least print the `"Please add echo export PATH=~/.phive/tools:$PATH to ~/.bashrc"` message on screen.

No it doesn't. It installs in $cwd/tools. Which is the default use case and identical to any dependency manager.