function Git::checkIgnore
Same name in other branches
- 8.9.x composer/Plugin/Scaffold/Git.php \Drupal\Composer\Plugin\Scaffold\Git::checkIgnore()
- 10 composer/Plugin/Scaffold/Git.php \Drupal\Composer\Plugin\Scaffold\Git::checkIgnore()
- 11.x composer/Plugin/Scaffold/Git.php \Drupal\Composer\Plugin\Scaffold\Git::checkIgnore()
Determines whether the specified scaffold file is already ignored.
Parameters
\Composer\IO\IOInterface $io: The Composer IO interface.
string $path: Path to scaffold file to check.
string $dir: Base directory for git process.
Return value
bool Whether the specified file is already ignored or not (TRUE if ignored).
2 calls to Git::checkIgnore()
- ManageGitIgnore::manageIgnored in composer/
Plugin/ Scaffold/ ManageGitIgnore.php - Manages gitignore files.
- ManageGitIgnore::managementOfGitIgnoreEnabled in composer/
Plugin/ Scaffold/ ManageGitIgnore.php - Determines whether we should manage gitignore files.
File
-
composer/
Plugin/ Scaffold/ Git.php, line 34
Class
- Git
- Provide some Git utility operations.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
public static function checkIgnore(IOInterface $io, $path, $dir = NULL) {
$process = new ProcessExecutor($io);
$output = '';
$exitCode = $process->execute('git check-ignore ' . $process->escape($path), $output, $dir);
return $exitCode == 0;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.