Skip to content

Instantly share code, notes, and snippets.

@scottalan
Last active January 20, 2016 22:52
Show Gist options
  • Select an option

  • Save scottalan/b2c088f2dbbd84397995 to your computer and use it in GitHub Desktop.

Select an option

Save scottalan/b2c088f2dbbd84397995 to your computer and use it in GitHub Desktop.
diff --git a/includes/filesystem.inc b/includes/filesystem.inc
index 0f29036..03a8b5f 100644
--- a/includes/filesystem.inc
+++ b/includes/filesystem.inc
@@ -676,6 +676,8 @@ function drush_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $c
$key = (in_array($key, array('filename', 'basename', 'name')) ? $key : 'filename');
$files = array();
+ $nomask = array_merge($nomask, array('node_modules', 'bower_components'));
+
if (is_string($dir) && is_dir($dir) && $handle = opendir($dir)) {
while (FALSE !== ($file = readdir($handle))) {
if (!in_array($file, $nomask) && (($include_dot_files && (!preg_match("/\.\+/",$file))) || ($file[0] != '.'))) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment