瀏覽代碼

Clarify conditional

Jordi Boggiano 12 年之前
父節點
當前提交
ba96f9f6b5
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/Composer/Command/CreateProjectCommand.php

+ 4 - 4
src/Composer/Command/CreateProjectCommand.php

@@ -194,11 +194,11 @@ EOT
 
         $installer->run();
 
-        if (!$keepVcs && (
-            !$io->isInteractive() ||
-            $io->askConfirmation('<info>Do you want to remove the exisitng VCS (.git, .svn..) history?</info> [<comment>Y,n</comment>]? ', true)
+        if (!$keepVcs && $installedFromVcs
+            && (
+                !$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);