Skip to content

Commit

Permalink
test: fix assertion for multiple packages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aykevl authored and deadprogram committed Feb 21, 2022
1 parent af8244e commit d75e142
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit d75e142

Please sign in to comment.