Skip to content

Commit

Permalink
Merge pull request #119 from rebuy-de/fix-dirtyfiles
Browse files Browse the repository at this point in the history
fix dirtyfiles listing
  • Loading branch information
svenwltr authored Apr 29, 2022
2 parents 935d808 + d2d6533 commit d68e678
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/buildutil/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ func CollectBuildInformation(ctx context.Context, p BuildParameters) (BuildInfo,

status := strings.TrimSpace(e.OutputString("git", "status", "-s"))
if status != "" {
info.Commit.DirtyFiles = strings.Split(status, "\n ")
for _, file := range strings.Split(status, "\n") {
info.Commit.DirtyFiles = append(info.Commit.DirtyFiles, strings.TrimSpace(file))
}
}

nameMatch := regexp.MustCompile(`([^/]+)(/v\d+)?$`).FindStringSubmatch(info.Go.Module)
Expand Down

0 comments on commit d68e678

Please sign in to comment.