1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:10:22 -07:00

codereview: do not gofmt deleted files

R=r
https://golang.org/cl/164083
This commit is contained in:
Russ Cox 2009-12-03 17:23:11 -08:00
parent aaa2374b74
commit 9a86cc679a

View File

@ -622,6 +622,7 @@ def CheckGofmt(ui, repo, files, just_warn=False):
return
cwd = os.getcwd()
files = [RelativePath(repo.root + '/' + f, cwd) for f in files]
files = [f for f in files if os.access(f, 0)]
try:
cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
cmd.stdin.close()