Security update for Core, with self-updated composer
[yaffs-website] / vendor / drush / drush / includes / drush.inc
index 48744f05252814691dc53614a53dcc30ce054f94..3afcc5dbf539e8a72f0c1538bb99b021086ff8d3 100644 (file)
@@ -328,6 +328,7 @@ function drush_get_global_options($brief = FALSE) {
     $options['redirect-port']       = array('hidden' => TRUE, 'never-propagate' => TRUE, 'description' => 'Used by the user-login command to specify the redirect port on the local machine; it therefore would not do to pass this to the remote machines.');
     $options['cache-clear']         = array('propagate' => TRUE, 'description' => 'If 0, Drush skips normal cache clearing; the caller should then clear if needed.', 'example-value' => '0', );
     $options['local']               = array('propagate' => TRUE, 'description' => 'Don\'t look in global locations for commandfiles, config, and site aliases');
+    $options['ignored-directories'] = array('propagate' => TRUE, 'description' => "Exclude directories when searching for files in drush_scan_directory().", 'example-value' => 'node_modules,bower_components');
 
     $command = array(
         'options' => $options,
@@ -1028,9 +1029,19 @@ function drush_tarball_extract($path, $destination = FALSE, $listing = FALSE, $t
       // Remove the header line.
       array_shift($output);
       // Remove the prefix verb from each line.
-      $output = array_map(create_function('$str', 'return substr($str, strpos($str, ":") + 3 + ' . strlen($destination) . ');'), $output);
+      $output = array_map(
+        function ($str) use ($destination) {
+          return substr($str, strpos($str, ":") + 3 + strlen($destination));
+        },
+        $output
+      );
       // Remove any remaining blank lines.
-      $return = array_filter($output, create_function('$str', 'return $str != "";'));
+      $return = array_filter(
+        $output,
+        function ($str) {
+          return $str != "";
+        }
+      );
     }
   }
   // Otherwise we have a possibly-compressed Tar file.