Trim git version output

This commit is contained in:
Henry Mercer
2025-12-18 12:52:30 +00:00
parent 358a55e232
commit cec3cc5782
2 changed files with 2 additions and 2 deletions

2
lib/init-action.js generated
View File

@@ -91564,7 +91564,7 @@ async function getGitVersionOrThrow() {
["--version"],
"Failed to get git version."
);
const match = stdout.match(/^git version ((\d+\.\d+\.\d+).*)$/);
const match = stdout.trim().match(/^git version ((\d+\.\d+\.\d+).*)$/);
if (match?.[1] && match?.[2]) {
return new GitVersionInfo(match[2], match[1]);
}