mirror of
https://github.com/golang/go
synced 2024-11-21 19:04:44 -07:00
codereview: fix windows
Uploading go files on Windows aborts with gofmt: exceptions.ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr R=rsc, mattn, Joe Poirier CC=golang-dev https://golang.org/cl/4025046
This commit is contained in:
parent
17fc373af7
commit
59a6395279
@ -911,7 +911,7 @@ def CheckGofmt(ui, repo, files, just_warn):
|
||||
if not files:
|
||||
return
|
||||
try:
|
||||
cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
||||
cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=sys.platform != "win32")
|
||||
cmd.stdin.close()
|
||||
except:
|
||||
raise util.Abort("gofmt: " + ExceptionDetail())
|
||||
|
Loading…
Reference in New Issue
Block a user