From 12252775e08ddeb50a3739ffc5e3813fdd62e45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Tue, 2 Jun 2015 07:46:22 +0200 Subject: [PATCH] Drush adds two new lines before the metadata --- bandaid.drush.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bandaid.drush.inc b/bandaid.drush.inc index d9b0cda..7223d2b 100755 --- a/bandaid.drush.inc +++ b/bandaid.drush.inc @@ -990,6 +990,11 @@ function _bandaid_fix_info_files($dir) { } } if ($i > -1) { + // Drush adds two new lines before the metadata whereas drupal.org just + // adds one line. + if (strstr($matches[0], 'drush')) { + $i--; + } $lines = array_slice($lines, 0, $i); if (!file_put_contents($info_file->filename, implode("\n", $lines))) { throw new BandaidError('CANNOT_WRITE_INFO', dt('Could not write info file @file', array('@file' => $info_file->filename)));