From 85031d6df74cf0cec23800bd9a0bfb2acf9ac3f2 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Tue, 14 Dec 2021 10:47:02 -0800 Subject: [PATCH] tinygo: set cmd.Dir even when running emulators This allows compress/bzip2 to pass with -target=wasi Fixes #2367 --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 08a4b4ae..5c6af726 100644 --- a/main.go +++ b/main.go @@ -244,7 +244,6 @@ func runPackageTest(config *compileopts.Config, result builder.BuildResult, test flags = append(flags, "-test.run="+testRunRegexp) } cmd = executeCommand(config.Options, result.Binary, flags...) - cmd.Dir = result.MainDir } else { // Run in an emulator. args := append(config.Target.Emulator[1:], result.Binary) @@ -264,6 +263,7 @@ func runPackageTest(config *compileopts.Config, result builder.BuildResult, test } cmd = executeCommand(config.Options, config.Target.Emulator[0], args...) } + cmd.Dir = result.MainDir cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run()