File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
<pre>
2
2
<?php
3
3
4
- function runCommand ($ command )
4
+ function runCommand ($ command, $ shouldHaveOutput = true )
5
5
{
6
6
$ output = $ return_var = null ;
7
7
echo "Running: $ command \n" ;
8
8
exec ($ command , $ output , $ return_var );
9
9
10
+ if (!$ shouldHaveOutput ) {
11
+ return ;
12
+ }
13
+
10
14
if (empty ($ output ) || !is_array ($ output )) {
11
15
echo 'Fixtures could not be loaded: ' .var_export ($ return_var , true );
12
16
exit (1 );
13
17
}
14
-
18
+ echo PHP_EOL ;
15
19
echo "Output: \n" ;
16
20
foreach ($ output as $ line ) {
17
21
echo $ line ."\n" ;
18
22
}
19
23
}
20
24
21
- runCommand ('rm -rf app/cache/prod ' );
25
+ runCommand ('rm -rf app/cache/prod ' , false );
22
26
runCommand (__DIR__ .'/../bin/console --env=prod doctrine:phpcr:init:dbal --drop --force ' );
23
27
runCommand (__DIR__ .'/../bin/console --env=prod doctrine:phpcr:repository:init ' );
24
28
runCommand (__DIR__ .'/../bin/console -v --env=prod doctrine:phpcr:fixtures:load -n ' );
You can’t perform that action at this time.
0 commit comments