Skip to content

Commit

Permalink
Only populate $diff if we actually have any diffs.
Browse files Browse the repository at this point in the history
Fixes release always failing due to "changes in the package.xml file"
error.
  • Loading branch information
mrubinsk committed Jan 2, 2018
1 parent 37f892d commit bcd2f6e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Components/Component/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,13 @@ public function updatePackage($action, $options)
case 'diff':
$diff = '';
foreach ($this->_wrappers as $wrapper) {
$path = $wrapper->getLocalPath($this->_directory);
$diff .= '--- a/' . $path . "\n"
. '--- b/' . $path . "\n"
. $wrapper->diff();
$diff_tmp = $wrapper->diff();
if (!empty($diff_tmp)) {
$path = $wrapper->getLocalPath($this->_directory);
$diff .= '--- a/' . $path . "\n"
. '--- b/' . $path . "\n"
. $wrapper->diff();
}
}
return $diff;
default:
Expand Down

0 comments on commit bcd2f6e

Please sign in to comment.