phive icon indicating copy to clipboard operation
phive copied to clipboard

Add config command to change the default tools directory

Open sebastianheuer opened this issue 8 years ago • 3 comments

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.

sebastianheuer avatar Jul 04 '16 09:07 sebastianheuer

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.

sgohl avatar May 08 '19 09:05 sgohl

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

  • 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.
  • 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
  • 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
  • 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.

omawnakw avatar Jul 21 '20 11:07 omawnakw

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.

theseer avatar Jul 21 '20 12:07 theseer