diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php index 00bb21094..66c70452b 100644 --- a/src/Composer/Command/CreateProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -194,11 +194,11 @@ EOT $installer->run(); - if (!$keepVcs && ( - !$io->isInteractive() || - $io->askConfirmation('Do you want to remove the exisitng VCS (.git, .svn..) history? [Y,n]? ', true) + if (!$keepVcs && $installedFromVcs + && ( + !$io->isInteractive() + || $io->askConfirmation('Do you want to remove the exisitng VCS (.git, .svn..) history? [Y,n]? ', true) ) - && (!$preferDist || $installedFromVcs) ) { $finder = new Finder(); $finder->depth(1)->directories()->in(getcwd())->ignoreVCS(false)->ignoreDotFiles(false);