소스 검색

Only ask for gitignore if the current dir is a git repo, fixes composer/satis#44

Jordi Boggiano 12 년 전
부모
커밋
e7f4768668
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Composer/Command/InitCommand.php

+ 1 - 1
src/Composer/Command/InitCommand.php

@@ -120,7 +120,7 @@ EOT
 
         $file->write($options);
 
-        if ($input->isInteractive()) {
+        if ($input->isInteractive() && is_dir('.git')) {
             $ignoreFile = realpath('.gitignore');
 
             if (false === $ignoreFile) {