Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
codereview: fix windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hectorchu authored and rsc committed Jan 24, 2011
1 parent 17fc373 commit 59a6395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codereview/codereview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 59a6395

Please sign in to comment.