Преглед изворни кода

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.