Problem/Motivation

OK, look...it just sucks when you install Project Browser or Automatic Updates, only to get a nasty error because the paths to Composer and/or rsync are not in the web server's PATH.

There's no reason it has to be this way. We can't prevent it in under all circumstances, but we can make it a little less likely if Package Manager is installed at the command line (as is the case in the Starshot prototype, or any time Drush installs Package Manager).

Proposed resolution

During hook_install(), Package Manager should use Symfony's executable finder to try and locate Composer and rsync. If either is found, they should be written to the package_manager.settings config.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Assigned: Unassigned » tedbow
Status: Active » Needs review
phenaproxima’s picture

Issue summary: View changes
phenaproxima’s picture

Issue summary: View changes
tedbow’s picture

Assigned: tedbow » phenaproxima
Status: Needs review » Needs work
  1. if Package Manager is installed at the command line (as is the case in the Starshot prototype, or any time Drush installs Package Manager).

    Why does this apply more to command line then the web install? Won't the logic be the same in either case?

  2. What happens if you installed package manager locally, the config is automatically set to /local-path/composer but then you deploy the site to server with config and composer is at /server-path/composer. Won't package manager fail because composer is not at /local-path/composer and won't try to find it because the config is set.

    As it is now if you install package manager locally and package manager can find Composer and then you deploy to a server and Package Manager can also find Composer but it is at different path then it will work in both places.

    But as I understand this change depending on how you deploy config then this will no longer work.

  3. If 2) is right could you not just handle this in the Starshot repo as it more defined use case where you can assume more things.

    Especially since I don't think we have ever had a issue filed from actual use complaining about this problem. My guess is usually Package Manager finds Composer and Rsync without a problem

pameeela’s picture

Feels like a target rather than a blocker, not that I am trying to discourage :)