mirror of
https://github.com/golang/go
synced 2024-11-21 21:04:41 -07:00
codereview: do not gofmt deleted files
R=r https://golang.org/cl/164083
This commit is contained in:
parent
aaa2374b74
commit
9a86cc679a
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user