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\UtilCode
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;
}