8000 [FrameworkBundle] Refactored assets:install command, tweaked output by 1ed · Pull Request #13057 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Refactored assets:install command, tweaked output #13057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweaked error handling
  • Loading branch information
1ed committed Dec 28, 2014
commit 736ec74f5b06e935ec655b4d7ddfa299e2ec0861
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Command;

use Exception;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -106,9 +107,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$targetDir = $bundlesDir.preg_replace('/bundle$/', '', strtolower($bundle->getName()));
$this->filesystem->remove($targetDir);

try {
$this->filesystem->remove($targetDir);

if ($symlink) {
if ($input->getOption('relative')) {
$methodOrError = $this->relativeSymlinkWithFallback($originDir, $targetDir);
Expand All @@ -118,7 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$methodOrError = $this->hardCopy($originDir, $targetDir);
}
} catch (IOException $e) {
} catch (Exception $e) {
$methodOrError = sprintf('<error>%s</error>', $e->getMessage());
$failed = 1;
}
Expand Down
0