Skip to content

Commit d8f428f

Browse files
committed
fixed issue where certain commands would not execute due to env typings
1 parent 24ae46e commit d8f428f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Helper/Shell.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Shell
5656
protected array $descriptors;
5757

5858
/** @var array An array of environment variables */
59-
protected array $env = [];
59+
protected ?array $env = null;
6060

6161
/** @var int Exit code of the process once it has been terminated */
6262
protected ?int $exitCode = null;
@@ -166,12 +166,12 @@ protected function checkTimeout(): void
166166

167167
public function setOptions(
168168
string $cwd = null,
169-
array $env = null,
169+
?array $env = null,
170170
float $timeout = null,
171171
array $otherOptions = []
172172
): self {
173173
$this->cwd = $cwd;
174-
$this->env = $env ?? [];
174+
$this->env = $env;
175175
$this->processTimeout = $timeout;
176176
$this->otherOptions = $otherOptions;
177177

0 commit comments

Comments
 (0)