mirror of
https://github.com/golang/go
synced 2024-11-12 01:20:22 -07:00
codereview: use subprocess.call() instead of os.spawnvp() for portability
Fixes #4121. R=golang-dev, minux.ma, dave, r CC=golang-dev https://golang.org/cl/6555049
This commit is contained in:
parent
60a6ae8c3c
commit
b7331f9b3a
@ -1772,7 +1772,7 @@ def gofmt(ui, repo, *pats, **opts):
|
||||
cmd = ["gofmt", "-l"]
|
||||
if not opts["list"]:
|
||||
cmd += ["-w"]
|
||||
if os.spawnvp(os.P_WAIT, "gofmt", cmd + files) != 0:
|
||||
if subprocess.call(cmd + files) != 0:
|
||||
raise hg_util.Abort("gofmt did not exit cleanly")
|
||||
except hg_error.Abort, e:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user