Skip to content

Commit

Permalink
Tweak the code to avoid fabbot false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 12, 2020
1 parent c30583b commit 8cc1c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ private function replacePlaceholders(string $commandline, array $env)
{
return preg_replace_callback('/"\$\{:([_a-zA-Z]++[_a-zA-Z0-9]*+)\}"/', function ($matches) use ($commandline, $env) {
if (!isset($env[$matches[1]]) || false === $env[$matches[1]]) {
throw new InvalidArgumentException(sprintf('Command line is missing a value for parameter "%s": %s.', $matches[1], $commandline));
throw new InvalidArgumentException(sprintf('Command line is missing a value for parameter "%s": '.$commandline, $matches[1]));
}

return $this->escapeArgument($env[$matches[1]]);
Expand Down

0 comments on commit 8cc1c1b

Please sign in to comment.