Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProcessExecutor.php

function ProcessExecutor::requiresGitDirEnv

Parameters

string[]|string $command:

1 call to ProcessExecutor::requiresGitDirEnv()
ProcessExecutor::doExecute in vendor/composer/composer/src/Composer/Util/ProcessExecutor.php

File

vendor/composer/composer/src/Composer/Util/ProcessExecutor.php, line 561

Class

ProcessExecutor
@author Robert Schönthal <seroscho@googlemail.com> @author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Util

Code

public function requiresGitDirEnv($command) : bool {
    $cmd = !is_array($command) ? explode(' ', $command) : $command;
    if ($cmd[0] !== 'git') {
        return false;
    }
    foreach (self::GIT_CMDS_NEED_GIT_DIR as $gitCmd) {
        if (array_intersect($cmd, $gitCmd) === $gitCmd) {
            return true;
        }
    }
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal