Commit 59a63952 authored by Hector Chu's avatar Hector Chu Committed by Russ Cox

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
parent 17fc373a
......@@ -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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment