Jelajahi Sumber

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

* usefulthink/windows-symlink-errormessage:
  [FrameworkBundle] added errormessage for windows in AssetsInstallCommand
Fabien Potencier 14 tahun lalu
induk
melakukan
9286f78116

+ 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.