Skip to content

Commit 1a96017

Browse files
authored
Fix make fmt/lint not to fail when file is deleted (#3112)
1 parent 1d6db88 commit 1a96017

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/lintdiff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def main():
4848
d = os.path.dirname(filename)
4949
dirs.add(d)
5050

51+
dirs = ["./" + d for d in sorted(dirs) if os.path.exists(d)]
52+
5153
if not dirs:
5254
sys.exit(0)
5355

54-
dirs = ["./" + d for d in sorted(dirs)]
55-
5656
cmd = ["golangci-lint"] + args.args + dirs
5757
print("+ " + " ".join(cmd), file=sys.stderr, flush=True)
5858
os.execvp(cmd[0], cmd)

0 commit comments

Comments
 (0)