From ba96f9f6b56a75f0e2988f0e118e6fd8f640c56e Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 19 Oct 2012 13:42:35 +0200 Subject: [PATCH] Clarify conditional --- src/Composer/Command/CreateProjectCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);