From 8464826d42c727fb05fe2863e900dbf125c2ec30 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Fri, 14 Jun 2024 14:25:07 -0400 Subject: [PATCH] feat(ci): check if output file exists --- .github/scripts/compliance_parser.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/compliance_parser.sh b/.github/scripts/compliance_parser.sh index 154bde9f1..c6af83153 100755 --- a/.github/scripts/compliance_parser.sh +++ b/.github/scripts/compliance_parser.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Check for xml output file +if [ -f "$1" ]; then + echo "$1 exists." +else + echo "$1 does not exist." + exit 1 +fi # Parse the XML data errors=$(xmllint --xpath 'string(//testsuite/@errors)' "$1") failures=$(xmllint --xpath 'string(//testsuite/@failures)' "$1")