File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -46,19 +46,22 @@ jobs:
4646 # See: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository
4747 - name : Check license file
4848 run : |
49+ EXIT_STATUS=0
4950 # See: https://github.com/licensee/licensee
5051 LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
5152
5253 DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
5354 echo "Detected license file: $DETECTED_LICENSE_FILE"
5455 if [ "$DETECTED_LICENSE_FILE" != "\"${EXPECTED_LICENSE_FILENAME}\"" ]; then
5556 echo "ERROR: detected license file doesn't match expected: $EXPECTED_LICENSE_FILENAME"
56- exit 1
57+ EXIT_STATUS= 1
5758 fi
5859
5960 DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
6061 echo "Detected license type: $DETECTED_LICENSE_TYPE"
6162 if [ "$DETECTED_LICENSE_TYPE" != "\"${EXPECTED_LICENSE_TYPE}\"" ]; then
6263 echo "ERROR: detected license type doesn't match expected $EXPECTED_LICENSE_TYPE"
63- exit 1
64+ EXIT_STATUS= 1
6465 fi
66+
67+ exit $EXIT_STATUS
You can’t perform that action at this time.
0 commit comments