Skip to content

Commit

Permalink
Avoid recomputing the relative vendor dir by using the one we are giv…
Browse files Browse the repository at this point in the history
…en directly
  • Loading branch information
radford committed Jul 28, 2014
1 parent 7c93f04 commit 8170b4f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Clue/PharComposer/Bundler/Complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,11 @@ public function __construct(Package $package, Logger $logger)
public function bundle()
{
$bundle = new Bundle();
// Determine the vendor dir relative to the package directory (without any trailing /).
// If the vendor dir is not under the package directory then this does nothing.
$vendor = preg_replace(
'#^' . preg_quote($this->package->getDirectory(),'#') . '(.*?)/?$#',
'\1',
$this->package->getPathVendor()
);
$iterator = Finder::create()
->files()
->ignoreVCS(true)
->filter($this->package->getBlacklistFilter())
->exclude($vendor)
->exclude($this->package->getPathVendorRelative())
->in($this->package->getDirectory());
$this->logger->log(' Adding whole project directory "' . $this->package->getDirectory() . '"');
return $bundle->addDir($iterator);
Expand Down

0 comments on commit 8170b4f

Please sign in to comment.