From 6f1d0ab31c70aa74654455ca2dfcd170cfdf9aa5 Mon Sep 17 00:00:00 2001 From: Jeroen Ketelaar Date: Mon, 18 Dec 2017 11:49:31 +0100 Subject: [PATCH] [BUGFIX] Solved link to absolute paths with spaces *Example output before change:* ``` /usr/local/bin/php /Users/ketelaar/Projects/My Project/bin/console ``` This basically means you are executing `/Users/ketelaar/Projects/My` with php Example output after change: ``` /usr/local/bin/php /Users/ketelaar/Projects/My\ Project/bin/console ``` --- Exporter/AnnotationCronExporter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Exporter/AnnotationCronExporter.php b/Exporter/AnnotationCronExporter.php index 1b5bd5e..80bab97 100644 --- a/Exporter/AnnotationCronExporter.php +++ b/Exporter/AnnotationCronExporter.php @@ -120,9 +120,9 @@ private function buildCommand($commandName, $annotation, array $options) $executor = ''; } - $console = isset($this->config['console']) ? ' ' . $this->config['console'] : ''; + $console = isset($this->config['console']) ? ' ' . str_replace(' ', '\ ', $this->config['console']) : ''; $environment = isset($options['environment']) ? ' --env=' . $options['environment'] : ''; $params = $annotation->params ? ' ' . $annotation->params : ''; return $executor . $console . ' ' . $commandName . $params . $environment; } -} \ No newline at end of file +}