summaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2013-09-22 08:01:17 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2013-09-22 08:01:17 +0100
commitf2c794f0194aea2ea85ca0042f11994e14200810 (patch)
treed05e06c5d28bd0f4bdbd31b370a3826836de9680 /src/cmd/api
parent00ec24e610618eb6e7f6eb2a11f5850132b0bc68 (diff)
downloadgo-f2c794f0194aea2ea85ca0042f11994e14200810.tar.gz
cmd/api: always do API check if hg is available
Fixes Issue 6124 R=golang-dev, minux.ma CC=golang-dev https://codereview.appspot.com/13500046
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/run.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/cmd/api/run.go b/src/cmd/api/run.go
index 9ecd03a60..f7c590bbe 100644
--- a/src/cmd/api/run.go
+++ b/src/cmd/api/run.go
@@ -21,7 +21,6 @@ import (
"os/exec"
"os/user"
"path/filepath"
- "strconv"
"strings"
)
@@ -38,9 +37,9 @@ func main() {
if goroot == "" {
log.Fatal("No $GOROOT set.")
}
- isGoDeveloper := exec.Command("hg", "pq").Run() == nil
- if !isGoDeveloper && !forceAPICheck() {
- fmt.Println("Skipping cmd/api checks; hg codereview extension not available and GO_FORCE_API_CHECK not set")
+ _, err := exec.LookPath("hg")
+ if err != nil {
+ fmt.Println("Skipping cmd/api checks; hg not available")
return
}
@@ -88,12 +87,6 @@ func file(s ...string) string {
return filepath.Join(goroot, "api", s[0]+".txt")
}
-// GO_FORCE_API_CHECK is set by builders.
-func forceAPICheck() bool {
- v, _ := strconv.ParseBool(os.Getenv("GO_FORCE_API_CHECK"))
- return v
-}
-
// prepGoPath returns a GOPATH for the "go" tool to compile the API tool with.
// It tries to re-use a go.tools checkout from a previous run if possible,
// else it hg clones it.