Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #46 from arnested/feature/drush-metadata
Browse files Browse the repository at this point in the history
Drush adds two new lines before the metadata
  • Loading branch information
xendk committed Jun 2, 2015
2 parents 6995eb4 + 1225277 commit 86d8cd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bandaid.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit 86d8cd2

Please sign in to comment.