From 6a0acfc735da0d99d4c31d906e3e587f1ee57ac5 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 16 Jun 2026 14:56:00 -0700 Subject: [PATCH] main: don't mutate compile options in Test --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 7a5e96846..f7f2ad966 100644 --- a/main.go +++ b/main.go @@ -209,6 +209,8 @@ func Build(pkgName, outpath string, config *compileopts.Config) error { // Test runs the tests in the given package. Returns whether the test passed and // possibly an error if the test failed to run. func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options, outpath string) (bool, error) { + optionsCopy := *options + options = &optionsCopy options.TestConfig.CompileTestBinary = true config, err := builder.NewConfig(options) if err != nil {