]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
CI: Fix patchcheck (GH-31708)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Mon, 14 Mar 2022 13:28:57 +0000 (15:28 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Mar 2022 13:28:57 +0000 (15:28 +0200)
.azure-pipelines/posix-steps.yml
Tools/scripts/patchcheck.py

index 2a3680897302efe1b2c73a4eede3bc8925a8ea1c..29b43e0934472ea149370790e94cdb0b0398a0cf 100644 (file)
@@ -66,7 +66,9 @@ steps:
         COMMAND: make
 
 - ${{ if eq(parameters.patchcheck, 'true') }}:
-  - script: ./python Tools/scripts/patchcheck.py --ci true
+  - script: |
+      git fetch origin
+      ./python Tools/scripts/patchcheck.py --ci true
     displayName: 'Run patchcheck.py'
     condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
 
index 4cab66c8e97bed7e39e85aa803a7b4ada9b893f1..a324eafc52b2abb010a0eab5f822be067c88b71b 100755 (executable)
@@ -130,6 +130,8 @@ def changed_files(base_branch=None):
         with subprocess.Popen(cmd.split(),
                               stdout=subprocess.PIPE,
                               cwd=SRCDIR) as st:
+            if st.wait() != 0:
+                sys.exit(f'error running {cmd}')
             for line in st.stdout:
                 line = line.decode().rstrip()
                 status_text, filename = line.split(maxsplit=1)