public static function ScriptHandler::removeGitDirectories in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5
Same name and namespace in other branches
- 8.8 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeGitDirectories()
- 8.4 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeGitDirectories()
- 8.6 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeGitDirectories()
- 8.7 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeGitDirectories()
- 9.0.x src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::removeGitDirectories()
Remove .git folder from modules, themes, profiles of development branches.
File
- src/
composer/ ScriptHandler.php, line 110
Class
- ScriptHandler
- Varbase Composer Script Handler.
Namespace
Varbase\composerCode
public static function removeGitDirectories() {
$drupal_root = static::getDrupalRoot(getcwd());
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
self::removeWindowsGitDirectories($drupal_root);
}
else {
exec("find " . $drupal_root . " -name '.git' | xargs rm -rf");
}
}