aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2021-12-14 10:47:02 -0800
committerNia <[email protected]>2021-12-20 13:13:32 -0500
commit85031d6df74cf0cec23800bd9a0bfb2acf9ac3f2 (patch)
treebe9c22d4a8a6183dd64bd7b17afe65606230ab75 /main.go
parent58b44f9f174a01e64b509f6bb1efa9aec13ec71d (diff)
downloadtinygo-85031d6df74cf0cec23800bd9a0bfb2acf9ac3f2.tar.gz
tinygo-85031d6df74cf0cec23800bd9a0bfb2acf9ac3f2.zip
tinygo: set cmd.Dir even when running emulators
This allows compress/bzip2 to pass with -target=wasi Fixes #2367
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 08a4b4ae5..5c6af7269 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()