Skip to content

Commit

Permalink
[FrameworkBundle] added errormessage for windows in AssetsInstallCommand
Browse files Browse the repository at this point in the history
As it has recently been discussed [on the mailing-list][1], windows doesn't
support symlinks for the assets:install command. In order to avoid a 'call to
undefined-function'-message in this case, this patch adds an exception which
will be thrown when the symlink-funktion isn't present and the
`--symlink`-Option was specified.

[1]: https://groups.google.com/group/symfony-devs/browse_thread/thread/4b8ad9634bdab155
  • Loading branch information
Martin Schuhfuss committed May 9, 2011
1 parent 787935f commit ad41d21
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -63,6 +63,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
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.
Expand Down

0 comments on commit ad41d21

Please sign in to comment.