Check for necessity of VCS cleanup when --prefer-dist is used (only project package, so far)
parent
4f4cbc17d9
commit
051118c500
|
@ -169,6 +169,7 @@ EOT
|
||||||
if ($package->getRepository() instanceof NotifiableRepositoryInterface) {
|
if ($package->getRepository() instanceof NotifiableRepositoryInterface) {
|
||||||
$package->getRepository()->notifyInstall($package);
|
$package->getRepository()->notifyInstall($package);
|
||||||
}
|
}
|
||||||
|
$installedFromVcs = 'source' === $package->getInstallationSource();
|
||||||
|
|
||||||
$io->write('<info>Created project in ' . $directory . '</info>');
|
$io->write('<info>Created project in ' . $directory . '</info>');
|
||||||
chdir($directory);
|
chdir($directory);
|
||||||
|
@ -197,6 +198,7 @@ EOT
|
||||||
!$io->isInteractive() ||
|
!$io->isInteractive() ||
|
||||||
$io->askConfirmation('<info>Do you want to remove the exisitng VCS (.git, .svn..) history?</info> [<comment>Y,n</comment>]? ', true)
|
$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 = new Finder();
|
||||||
$finder->depth(1)->directories()->in(getcwd())->ignoreVCS(false)->ignoreDotFiles(false);
|
$finder->depth(1)->directories()->in(getcwd())->ignoreVCS(false)->ignoreDotFiles(false);
|
||||||
|
|
Loading…
Reference in New Issue