The "git binary / The git binary is present and executable" status message in the site Status report page (/admin/reports/status) shows as an error (has a class="error"). Shouldn't it be class="ok" instead?

Comments

klonos’s picture

StatusFileSize
new11.97 KB

git binary status

mustanggb’s picture

Category: Bug report » Support request
Status: Active » Fixed

If you're getting "error" instead of "ok" then it means (as per README.txt) that the git command is not executable by your webserver, i.e. either the functions "exec" or "git" aren't available (e.g. git isn't installed or the functions are disabled in your php.ini).

Once these two functions are available the class will change to "ok".

Status: Fixed » Closed (fixed)

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

klonos’s picture

Category: Support request » Bug report
Status: Closed (fixed) » Active

Sorry to resurrect this issue after such a long time, but the status-icon is still shown as error while the status-value is "The git binary is present and executable". Shouldn't it be "The git binary is EITHER NOT present OR NOT executable" instead?

klonos’s picture

Title: git binary message in site Status page shows up as an error. » git binary message in site Status page is the same for present/not-present.

...perhaps an issue title change would help.

klonos’s picture

In other words, when the binary is present, the user gets an "ok" status and text. When the binary is missing, the user gets an error but the text still says "The git binary is present and executable". So, the user is puzzled: why the error message if the binary is present and executable?

juagarc4’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

This is because in the info file the text for the message is fixed with "The git binary is present and executable"
while the severity is changed in function of the existence or unexistence of the git and exec commands.
The severity determines then the icon to show, but the text is always the same.

The info file says:

function git_deploy_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $requirements['git'] = array(
      'title' => t('git binary'),
      'value' => t('The git binary is present and executable'),
      'severity' => function_exists('exec') && exec('git') ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}

We can test the requisites separately and set an understandable message according the problem. The severity ist set to ERROR if there is any error.

I have added a patch.

brianfisher’s picture

+1 the current message is confusing.

darren oh’s picture

Title: git binary message in site Status page is the same for present/not-present. » [D7] Fix installation requirements
Status: Needs review » Patch (to be ported)
Parent issue: » #3079539: Run exec() checking when module is installed as it would not work at all without it
darren oh’s picture

Status: Patch (to be ported) » Needs review
darren oh’s picture

darren oh’s picture

StatusFileSize
new1.73 KB

Uploaded wrong patch.

darren oh’s picture

Issue tags: +Needs reroll

  • Darren Oh committed eb8aa88 on 7.x-2.x
    Issue #2129795 by Darren Oh: Fix from 8.x-2.x branch for confusing...
darren oh’s picture

Status: Needs review » Fixed
Issue tags: -Needs reroll

Status: Fixed » Closed (fixed)

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