private static function ScriptHandler::removeWindowsGitDirectories in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.8
Same name and namespace in other branches
- 8.4 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeWindowsGitDirectories()
- 8.5 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeWindowsGitDirectories()
- 8.6 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeWindowsGitDirectories()
- 8.7 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeWindowsGitDirectories()
- 9.0.x src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeWindowsGitDirectories()
Find and return the path to .git repository in root folder.
Parameters
string $root: The Drupal root directory.
1 call to ScriptHandler::removeWindowsGitDirectories()
- ScriptHandler::removeGitDirectories in src/
composer/ ScriptHandler.php - Remove .git folder from modules, themes, profiles of development branches.
File
- src/
composer/ ScriptHandler.php, line 179
Class
- ScriptHandler
- Varbase Composer Script Handler.
Namespace
Varbase\composerCode
private static function removeWindowsGitDirectories($root) {
foreach (scandir($root) as $dirOrFile) {
if ('.' === $dirOrFile || '..' === $dirOrFile) {
continue;
}
if ('.git' === $dirOrFile) {
self::rmdirWindows($root . '/.git');
}
elseif (!is_file($root . '/' . $dirOrFile)) {
self::removeWindowsGitDirectories($root . '/' . $dirOrFile);
}
}
}