Skip to content

Commit c12ae7b

Browse files
authored
Move $position into its own else block and default it to false instead of null.
1 parent 24ed4ed commit c12ae7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Command.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ public function setCommand($command)
147147
$command = escapeshellcmd($command);
148148
}
149149
if ($this->getIsWindows()) {
150-
$position = null;
151-
152150
// Make sure to switch to correct drive like "E:" first if we have a full path in command
153151
if (isset($command[1]) && $command[1]===':') {
154152
$position = 1;
155153
// Could be a quoted absolute path because of spaces. i.e. "C:\Program Files (x86)\file.exe"
156154
} elseif (isset($command[2]) && $command[2]===':') {
157155
$position = 2;
156+
} else {
157+
$position = false;
158158
}
159159

160160
// Absolute path. If it's a relative path, let it slide.

0 commit comments

Comments
 (0)