From 0884e8d7c06a930c3e84bed8fd8baab978300c6b Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Fri, 19 Jul 2024 22:44:49 +0530 Subject: [PATCH] fix(build): handle args order properly --- build/build.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/build.go b/build/build.go index 3a1e15a..7bae338 100644 --- a/build/build.go +++ b/build/build.go @@ -76,8 +76,11 @@ func main() { buildTags = append(buildTags, []string{"-tags", strings.Join(features, ",")}...) } + subcommand := goArgs[0] + goArgs = goArgs[1:] + combinedArgs := append(buildTags, goArgs...) cmd, _, _, _ := Command("go"). - WithArgs(append(buildTags, goArgs...)...). + WithArgs(append([]string{subcommand}, combinedArgs...)...). WithVar( "CGO_LDFLAGS", fmt.Sprintf("-L %s -lLuau.VM -lm -lstdc++", artifactDir),