git-update: dump output in case subproject download fails
authorJordan Petridis <jordan@centricular.com>
Tue, 31 Aug 2021 16:47:34 +0000 (19:47 +0300)
committerJordan Petridis <jordan@centricular.com>
Tue, 31 Aug 2021 17:21:32 +0000 (20:21 +0300)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/261>

git-update

index 948d0d4..ec0f470 100755 (executable)
@@ -207,7 +207,14 @@ if __name__ == "__main__":
 
     if options.manifest:
         meson = get_meson()
-        targets_s = subprocess.check_output(meson + ['subprojects', 'download'])
+        try:
+            targets_s = subprocess.check_output(meson + ['subprojects', 'download'], shell=False, universal_newlines=True)
+        except subprocess.CalledProcessError as err:
+            print(f"Subproject download Failed")
+            print(f"Output: {err.output}")
+            print(f"Exit code: {err.returncode}")
+            exit(err.returncode)
+
         repos_commits = manifest_get_commits(options.manifest)
         FORCE_CHECKOUT = True
     else: