1
0
Fork 0

Check for necessity of VCS cleanup when --prefer-dist is used (only project package, so far)

pull/1230/head
Ulrich Kautz 2012-10-19 12:56:59 +02:00
parent 4f4cbc17d9
commit 051118c500
1 changed files with 2 additions and 0 deletions

View File

@ -169,6 +169,7 @@ EOT
if ($package->getRepository() instanceof NotifiableRepositoryInterface) {
$package->getRepository()->notifyInstall($package);
}
$installedFromVcs = 'source' === $package->getInstallationSource();
$io->write('<info>Created project in ' . $directory . '</info>');
chdir($directory);
@ -197,6 +198,7 @@ EOT
!$io->isInteractive() ||
$io->askConfirmation('<info>Do you want to remove the exisitng VCS (.git, .svn..) history?</info> [<comment>Y,n</comment>]? ', true)
)
&& (!$preferDist || $installedFromVcs)
) {
$finder = new Finder();
$finder->depth(1)->directories()->in(getcwd())->ignoreVCS(false)->ignoreDotFiles(false);