Skip to content

Commit 826158f

Browse files
committed
Always use linux,windows,darwin tags when running go list -deps
1 parent f60417b commit 826158f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

magefile.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,14 +530,14 @@ func genNotice(fips bool) error {
530530
// getModules returns a list of direct and indirect modules that are used by the main package and its dependencies.
531531
// Test and tooling packages are excluded.
532532
func getModules(extraTags ...string) ([]string, error) {
533+
tags := append([]string{"linux", "darwin", "windows"}, extraTags...)
533534
args := []string{
534535
"list",
535536
"-deps",
536537
"-f",
537538
"{{with .Module}}{{if not .Main}}{{.Path}}{{end}}{{end}}",
538-
}
539-
if len(extraTags) > 0 {
540-
args = append(args, "-tags", strings.Join(extraTags, ","))
539+
"-tags",
540+
strings.Join(tags, ","),
541541
}
542542
output, err := sh.Output("go", args...)
543543
if err != nil {

0 commit comments

Comments
 (0)