From a3658c36c926a0184d143a372ba0540cd488d8b6 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 29 Nov 2022 05:42:28 -0600 Subject: [PATCH] Log the output when a link check fails (#161) Fixes https://github.com/jupyterlab/maintainer-tools/issues/160 --- .github/actions/check-links/check_links.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/check-links/check_links.py b/.github/actions/check-links/check_links.py index a64d0b6..698de1a 100644 --- a/.github/actions/check-links/check_links.py +++ b/.github/actions/check-links/check_links.py @@ -65,8 +65,8 @@ def check_links(ignore_glob, ignore_links, links_expire): try: log(f"\n{f} (second attempt)...\n") subprocess.check_output(file_cmd + ["--lf"], shell=False) - except Exception as e: - log(e) + except subprocess.CalledProcessError as e: + log(e.output) fails += 1 if fails == 3: raise RuntimeError("Found three failed links, bailing")