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;