Skip to content

Commit 23abae6

Browse files
authored
CI: Fix patchcheck (GH-31708)
1 parent bb1c543 commit 23abae6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.azure-pipelines/posix-steps.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ steps:
6666
COMMAND: make
6767

6868
- ${{ if eq(parameters.patchcheck, 'true') }}:
69-
- script: ./python Tools/scripts/patchcheck.py --ci true
69+
- script: |
70+
git fetch origin
71+
./python Tools/scripts/patchcheck.py --ci true
7072
displayName: 'Run patchcheck.py'
7173
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
7274

Tools/scripts/patchcheck.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def changed_files(base_branch=None):
130130
with subprocess.Popen(cmd.split(),
131131
stdout=subprocess.PIPE,
132132
cwd=SRCDIR) as st:
133+
if st.wait() != 0:
134+
sys.exit(f'error running {cmd}')
133135
for line in st.stdout:
134136
line = line.decode().rstrip()
135137
status_text, filename = line.split(maxsplit=1)

0 commit comments

Comments
 (0)