From b398d642321a24cee76c383303930ad8cd037f1a Mon Sep 17 00:00:00 2001 From: Robin Fuller Date: Fri, 6 Jul 2018 15:53:08 +0100 Subject: [PATCH] Escapes spaces in command filename This change will allow for the command executable to have spaces in the file name. In Windows this would previously have failed. --- src/Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command.php b/src/Command.php index a64b2f1..04cc98c 100644 --- a/src/Command.php +++ b/src/Command.php @@ -164,7 +164,7 @@ public function setCommand($command) // Absolute path. If it's a relative path, let it slide. if ($position) { - $command = sprintf($command[$position - 1].': && cd %s && %s', escapeshellarg(dirname($command)), basename($command)); + $command = sprintf($command[$position - 1].': && cd %s && %s', escapeshellarg(dirname($command)), escapeshellarg(basename($command))); } } $this->_command = $command;