Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8e7478

Browse filesBrowse files
committed
[FrameworkBundle] Dont create empty bundles directory
1 parent 8d7f6ed commit f8e7478
Copy full SHA for f8e7478

File tree

Expand file treeCollapse file tree

1 file changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-6
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
120120
}
121121
}
122122

123-
// Create the bundles directory otherwise symlink will fail.
124123
$bundlesDir = $targetArg.'/bundles/';
125-
$this->filesystem->mkdir($bundlesDir, 0777);
126124

127125
$io = new SymfonyStyle($input, $output);
128126
$io->newLine();
@@ -186,18 +184,22 @@ protected function execute(InputInterface $input, OutputInterface $output)
186184
}
187185
}
188186
// remove the assets of the bundles that no longer exist
189-
$dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir);
190-
$this->filesystem->remove($dirsToRemove);
187+
if (is_dir($bundlesDir)) {
188+
$dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir);
189+
$this->filesystem->remove($dirsToRemove);
190+
}
191191

192-
$io->table(array('', 'Bundle', 'Method / Error'), $rows);
192+
if ($rows) {
193+
$io->table(array('', 'Bundle', 'Method / Error'), $rows);
194+
}
193195

194196
if (0 !== $exitCode) {
195197
$io->error('Some errors occurred while installing assets.');
196198
} else {
197199
if ($copyUsed) {
198200
$io->note('Some assets were installed via copy. If you make changes to these assets you have to run this command again.');
199201
}
200-
$io->success('All assets were successfully installed.');
202+
$io->success($rows ? 'All assets were successfully installed.' : 'No assets were provided by any bundle.');
201203
}
202204

203205
return $exitCode;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.