aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-02-19 13:11:33 +0100
committerRon Evans <[email protected]>2022-02-21 05:53:03 +0100
commitd75e14245b8dde4af7613d2d587b014688213e02 (patch)
treea03c4a54ac77a7dd472047cec452bce81d510a48 /main.go
parentaf8244e868bcc7224dce1132aae7bb555536255b (diff)
downloadtinygo-d75e14245b8dde4af7613d2d587b014688213e02.tar.gz
tinygo-d75e14245b8dde4af7613d2d587b014688213e02.zip
test: fix assertion for multiple packages
I see no reason why it isn't possible to run `tinygo test -c` with multiple packages. It'll just create multiple test outputs. I think the intended flag was the `-o` flag, which indeed doesn't make much sense with multiple packages.
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 5a8e05975..334898233 100644
--- a/main.go
+++ b/main.go
@@ -1413,8 +1413,8 @@ func main() {
if len(pkgNames) == 0 {
pkgNames = []string{"."}
}
- if *testCompileOnlyFlag && len(pkgNames) > 1 {
- fmt.Println("cannot use -c flag with multiple packages")
+ if outpath != "" && len(pkgNames) > 1 {
+ fmt.Println("cannot use -o flag with multiple packages")
os.Exit(1)
}