소스 검색

Merge remote branch 'usefulthink/windows-symlink-errormessage'

* usefulthink/windows-symlink-errormessage:
  [FrameworkBundle] added errormessage for windows in AssetsInstallCommand
Fabien Potencier 14 년 전
부모
커밋
9286f78116
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

+ 5 - 0
src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

@@ -63,6 +63,11 @@ EOT
             throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
         }
 
+        if (!function_exists('symlink') && $input->getOption('symlink')) {
+            throw new \InvalidArgumentException('The symlink()-Function is not available on your system.'
+                    . ' You need to install the assets without the --symlink option.');
+        }
+
         $filesystem = $this->container->get('filesystem');
 
         // Create the bundles directory otherwise symlink will fail.