Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcec3cc5

Browse files
committed
Trim git version output
1 parent358a55e commitcec3cc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎lib/init-action.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎src/git-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function getGitVersionOrThrow(): Promise<GitVersionInfo> {
5252
);
5353
// Git version output can vary: "git version 2.40.0" or "git version 2.40.0.windows.1"
5454
// We capture just the major.minor.patch portion to ensure semver compatibility.
55-
constmatch=stdout.match(/^gitversion((\d+\.\d+\.\d+).*)$/);
55+
constmatch=stdout.trim().match(/^gitversion((\d+\.\d+\.\d+).*)$/);
5656
if(match?.[1]&&match?.[2]){
5757
returnnewGitVersionInfo(match[2],match[1]);
5858
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp