Skip to content

Commit 35648b3

Browse files
authored
Merge pull request #34 from Robindfuller/patch-1
Escapes spaces in command filename
2 parents 7129dce + b398d64 commit 35648b3

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)