Skip to content

Commit b398d64

Browse files
authored
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.
1 parent 7129dce commit b398d64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function setCommand($command)
164164

165165
// Absolute path. If it's a relative path, let it slide.
166166
if ($position) {
167-
$command = sprintf($command[$position - 1].': && cd %s && %s', escapeshellarg(dirname($command)), basename($command));
167+
$command = sprintf($command[$position - 1].': && cd %s && %s', escapeshellarg(dirname($command)), escapeshellarg(basename($command)));
168168
}
169169
}
170170
$this->_command = $command;

0 commit comments

Comments
 (0)