aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2022-05-28 20:36:51 -0700
committerGravatar MarkKoz <[email protected]>2022-05-28 20:36:51 -0700
commit01b22edd40127ccb58fc34e5ced0b61b689efc6d (patch)
treeea3b1849cc3723ddc1153733f7356baac36b551b
parentDeps: specify flake8 deps via pre-commit (diff)
CI: only show pre-commit log if it exists
-rw-r--r--.github/workflows/lint.yaml6
1 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml
index abd7952..4a5288d 100644
--- a/.github/workflows/lint.yaml
+++ b/.github/workflows/lint.yaml
@@ -40,4 +40,8 @@ jobs:
# Show the log to debug failures.
- name: Show pre-commit log
if: always() && steps.run-pre-commit-hooks.outcome == 'failure'
- run: cat "${PRE_COMMIT_HOME}/pre-commit.log"
+ run: |
+ set -eu
+ if [ -f "${PRE_COMMIT_HOME}/pre-commit.log" ]; then
+ cat "${PRE_COMMIT_HOME}/pre-commit.log"
+ fi