We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff2cf46 commit d9a0e8eCopy full SHA for d9a0e8e
src/Command.php
@@ -146,7 +146,9 @@ public function setCommand($command)
146
$command = escapeshellcmd($command);
147
}
148
if ($this->getIsWindows()) {
149
- $command = sprintf('cd %s && %s', escapeshellarg(dirname($command)), basename($command));
+ // Make sure to switch to correct drive like "E:" first if we have a full path in command
150
+ $chdrive = (isset($command[1]) && $command[1]===':') ? $command[0].': && ' : '';
151
+ $command = sprintf($chdrive.'cd %s && %s', escapeshellarg(dirname($command)), basename($command));
152
153
$this->_command = $command;
154
return $this;
0 commit comments