Git Deploy displays an error on the status page if the git binary is not present and executable. Since it cannot do anything without the git binary, it should not allow installation without being able to execute the git binary.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Klemen Pevec created an issue. See original summary.

Gábor Hojtsy’s picture

Title: Upgrade Status not working on servers without exec » If exec is disabled, git deploy should silently return unknown version
Project: Upgrade Status » Git Deploy
Version: 8.x-1.0-rc1 » 8.x-2.x-dev

At least for the purposes of Upgrade Status, we can disable the version checking feature if you don't allow exec or return an unknown version number. Git deploy could resolve that by itself anyway, as it needs some fallback for when it cannot work. So moving to that queue.

KlemenDEV’s picture

An option to at least disable (skip version checking) git would be a great start, I agree.

Gábor Hojtsy’s picture

Well, git deploy attempts to augment the project info from packages. If it cannot exec() it should "fail silently" at least when it works. I can produce a status report warning that it is uselessly installed, but it would need to deal with this itself IMHO. Modules depending it cannot really tell what is the internal architecture of the module.

Darren Oh’s picture

Status: Active » Closed (works as designed)

Git Deploy displays an error on the Drupal status page if it is installed on a site with exec disabled.

KlemenDEV’s picture

It displays error on Drupal status page, but modules such as upgrade_status fail to work if exec is disabled.

Darren Oh’s picture

Git Deploy should be uninstalled if exec is disabled.

Gábor Hojtsy’s picture

Status: Closed (works as designed) » Active

Displaying an error on the status report page is not really helpful especially when using other projects that depend on git_deploy. Also uninstalling git_deploy in this case would not be useful for eg. upgrade_status which would also need to be uninstalled, even though it could do useful things without git_deploy, just not that useful. Git_deploy should by itself have a fail condition for when exec() is not enabled.

Darren Oh’s picture

Title: If exec is disabled, git deploy should silently return unknown version » Fix installation requirements
Issue summary: View changes
Status: Active » Needs review
FileSize
1.23 KB

Git Deploy should not be installed at all if git is not executable, because it cannot do anything. Projects that don’t require Git Deploy to work should not depend on it. Upgrade Status should implement its own message for the status page to notify admins of reduced functionality without Git Deploy.

I have provided a patch that clarifies the error message and prevents Git Deploy from being installed when the git binary is missing or not executable.

Gábor Hojtsy’s picture

Title: Fix installation requirements » Run exec() checking when module is installed as it would not work at all without it

  • Gábor Hojtsy committed c492989 on 8.x-2.x
    Issue #3079539 by Darren Oh, Gábor Hojtsy, Klemen Pevec: Run exec()...
Gábor Hojtsy’s picture

Status: Needs review » Fixed

Thanks @Darren Oh! Worked further from your patch to include specific messaging as to what the problem is so people have an easier time to debug / fix.

  • Gábor Hojtsy committed b15bddb on 8.x-2.x
    Issue #3079539 followup by Gábor Hojtsy: fix module name in requirements...

  • Gábor Hojtsy committed 00023b8 on 8.x-2.x
    Issue #3079539 followup by Gábor Hojtsy: further refine the short error...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.