mirror of
https://github.com/golang/go.git
synced 2025-11-06 11:40:59 +00:00
codereview: do not gofmt deleted files
R=r https://golang.org/cl/164083
This commit is contained in:
parent
aaa2374b74
commit
9a86cc679a
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue