mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 13:40:23 +08:00
Trim git version output
This commit is contained in:
2
lib/init-action.js
generated
2
lib/init-action.js
generated
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user