diff options
| author | ewy <ewy0@protonmail.com> | 2026-06-14 17:50:45 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-06-14 17:50:45 +0200 |
| commit | 40577525de2a01ca0b21a5d88757295ae7735580 (patch) | |
| tree | 5b7bd7d3884e1524517f36913ca18ac3a5a4ae0e /runner/gnumake/make.go | |
| parent | fc9d57a500e522ce254f34681c67c6b2f3300cd8 (diff) | |
enable multiline for make regex so we can find multiple make targets (lol)
Diffstat (limited to 'runner/gnumake/make.go')
| -rw-r--r-- | runner/gnumake/make.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runner/gnumake/make.go b/runner/gnumake/make.go index 93b523a..15b11ed 100644 --- a/runner/gnumake/make.go +++ b/runner/gnumake/make.go @@ -58,11 +58,11 @@ func (m *gnumake) Index(path string, f fs.FS, _ []model.Runner) ([]model.Target, return ParseOutput(makefile), nil } -var makeRegex = regexp.MustCompile("^([a-zA-Z-]*):((.*?)# (.*))?") +var makeRegex = regexp.MustCompile("(?m)^([a-zA-Z]*):((.*?)# (.*))?") func ParseOutput(input string) []model.Target { var targets []string - match := makeRegex.FindAllString(input, len(input)) + match := makeRegex.FindAllString(input, strings.Count(input, "\n")) for _, m := range match { targets = append(targets, m) } |
