Skip to content

Commit

Permalink
Avoid spawning a shell for git
Browse files Browse the repository at this point in the history
There is no need to pay for the overhead of spawning a shell.
call git directly.
  • Loading branch information
crrodriguez authored and sebastianbergmann committed Oct 9, 2024
1 parent 4e4fe61 commit 766fd83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private function getGitInformation(string $path): false|string
}

$process = proc_open(
'git describe --tags',
['git', 'describe', '--tags'],
[
1 => ['pipe', 'w'],
2 => ['pipe', 'w'],
Expand Down

0 comments on commit 766fd83

Please sign in to comment.