File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Filter options
src/Symfony/Bundle/FrameworkBundle/Command Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Original file line number Diff line number Diff line change @@ -120,9 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
120
120
}
121
121
}
122
122
123
- // Create the bundles directory otherwise symlink will fail.
124
123
$ bundlesDir = $ targetArg .'/bundles/ ' ;
125
- $ this ->filesystem ->mkdir ($ bundlesDir , 0777 );
126
124
127
125
$ io = new SymfonyStyle ($ input , $ output );
128
126
$ io ->newLine ();
@@ -186,18 +184,22 @@ protected function execute(InputInterface $input, OutputInterface $output)
186
184
}
187
185
}
188
186
// 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
+ }
191
191
192
- $ io ->table (array ('' , 'Bundle ' , 'Method / Error ' ), $ rows );
192
+ if ($ rows ) {
193
+ $ io ->table (array ('' , 'Bundle ' , 'Method / Error ' ), $ rows );
194
+ }
193
195
194
196
if (0 !== $ exitCode ) {
195
197
$ io ->error ('Some errors occurred while installing assets. ' );
196
198
} else {
197
199
if ($ copyUsed ) {
198
200
$ io ->note ('Some assets were installed via copy. If you make changes to these assets you have to run this command again. ' );
199
201
}
200
- $ io ->success ('All assets were successfully installed. ' );
202
+ $ io ->success ($ rows ? 'All assets were successfully installed. ' : ' No assets were provided by any bundle . ' );
201
203
}
202
204
203
205
return $ exitCode ;
You can’t perform that action at this time.
0 commit comments