Skip to content

Commit

Permalink
Merge pull request #237 from mlocati/fix-reading-configure-options-fr…
Browse files Browse the repository at this point in the history
…om-file-descriptor-stream

Fix reading configure options from file description streams
  • Loading branch information
mlocati authored Aug 18, 2021
2 parents ea757d2 + 6251806 commit 97104d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Base/Abstracts/Console/Command/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ protected function buildOptions(Package $package, InputInterface $input, OutputI
throw new Exception("File '{$force_opts}' is unusable");
}

if (DIRECTORY_SEPARATOR !== '\\' && preg_match('_^/dev/fd/\d+$_', $force_opts)) {
// https://bugs.php.net/bug.php?id=53465
$force_opts = str_replace('/dev/', 'php://', $force_opts);
}
$force_opts = preg_replace(',\\s+,', ' ', file_get_contents($force_opts));

return [null, $force_opts];
Expand Down

0 comments on commit 97104d5

Please sign in to comment.