]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/work/exec: throw an error when buildP is negative
authorYuki Osaki <yuki.osaki7@gmail.com>
Wed, 18 Aug 2021 05:05:55 +0000 (05:05 +0000)
committerJay Conrod <jayconrod@google.com>
Wed, 18 Aug 2021 17:25:17 +0000 (17:25 +0000)
commit4a0fd73eaded9f395b3e5025ab9e1c5c5f124143
tree5dad848f61b8c7c7d566a0fa9578cb427be379f4
parent0c83e01e0c1df712002af8bded845fbca9677ffa
cmd/go/internal/work/exec: throw an error when buildP is negative

Fixed a problem where an error would not occur
when a negative value was specified for the p flag.

`go build -p=0`
now should throw an error.

this is my first pr to this project.
If there's anything I'm missing, please let me know 🙏
Fixes #46686

Change-Id: I3b19773ef095fad0e0419100d317727c2268699a
GitHub-Last-Rev: e5c57804d9995f5c858aa42d9de21b25de246eb5
GitHub-Pull-Request: golang/go#47360
Reviewed-on: https://go-review.googlesource.com/c/go/+/336751
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/internal/work/init.go
src/cmd/go/testdata/script/build_negative_p.txt [new file with mode: 0644]