private static function ScriptHandler::removeWindowsGitDirectories in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.7
Same name and namespace in other branches
- 8.8 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeWindowsGitDirectories()
- 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()
- 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:
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 165
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);
}
}
}