File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,18 @@ public function run(ParameterBagInterface $parameterBag): string
23
23
$ command = [];
24
24
25
25
$ command [] = $ this ->getConsolePath ($ parameterBag ->get ('markup_job_queue.console_dir ' ));
26
- $ command [] = $ this ->args ['command ' ];
26
+
27
+ /**
28
+ * This is less than ideal, but trying to support legacy and v3 and v4 symfony
29
+ */
30
+ // If the command has been provided like `do:something "hello"` allow it through
31
+ if (stripos ($ this ->args ['command ' ], '" ' ) !== false ) {
32
+ $ command [] = $ this ->args ['command ' ];
33
+ } else {
34
+ // If the command has been provided like `do:something hello` split so the escaping is correct
35
+ $ command = array_merge ($ command , explode (' ' , $ this ->args ['command ' ]));
36
+ }
37
+
27
38
28
39
$ uuid = isset ($ this ->args ['uuid ' ]) ? $ this ->args ['uuid ' ]: null ;
29
40
if ($ uuid ) {
@@ -52,7 +63,7 @@ public function run(ParameterBagInterface $parameterBag): string
52
63
if (!$ process ->isSuccessful ()) {
53
64
$ message = sprintf (
54
65
'A job `%s` failed with topic `%s` with output:%s and the error output: %s ' ,
55
- $ command ,
66
+ $ this -> args [ ' command ' ] ,
56
67
$ this ->topic ,
57
68
$ process ->getOutput (),
58
69
$ process ->getErrorOutput ()
You can’t perform that action at this time.
0 commit comments